repo_name stringlengths 1 62 | dataset stringclasses 1
value | lang stringclasses 11
values | pr_id int64 1 20.1k | owner stringlengths 2 34 | reviewer stringlengths 2 39 | diff_hunk stringlengths 15 262k | code_review_comment stringlengths 1 99.6k |
|---|---|---|---|---|---|---|---|
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,411 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+use super::ramfs::RamDirectory;
+use super::*;
+
+use crate::error::SvsmError;
+use crate::locking::SpinLock;
+
+use core::cmp::min;
+
+extern crate alloc;
+use alloc::s... | Filtering before collecting could reduce the initial allocation size. Something like:
```rust
fn split_path_allow_empty(path: &str) -> Vec<&str> {
path.split('/')
.filter(|x| x.len() > 0)
.collect()
}
``` |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -219,6 +219,19 @@ impl Directory for RamDirectory {
Ok(new_dir)
}
+
+ fn unlink(&self, name: FileName) -> Result<(), SvsmError> {
+ let mut vec = self.entries.lock();
+ let pos = vec.iter().position(|e| e.name == name);
+
+ match pos {
+ Some(idx) => {
+ ... | If we do not care about the order of entries the entry could be removed with `vec.swap_remove(idx)`, which is O(1). |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,223 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+extern crate alloc;
+use super::*;
+use crate::error::SvsmError;
+use crate::locking::SpinLock;
+use crate::mm::{allocate_file_page_ref, PageRef};
+use crate::types::PAG... | Maybe I'm missing something but this does not need to be `&mut self`, right? |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,223 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+extern crate alloc;
+use super::*;
+use crate::error::SvsmError;
+use crate::locking::SpinLock;
+use crate::mm::{allocate_file_page_ref, PageRef};
+use crate::types::PAG... | If `current` is greater than `self.size` then `page_end - current` will overflow, which, as far as I know, causes a panic in debug builds. We should probably either check this and return an error, or use something like [`wrapping_sub()`](https://doc.rust-lang.org/std/primitive.u32.html#method.wrapping_sub). |
svsm | github_2023 | others | 27 | coconut-svsm | roy-hopkins | @@ -0,0 +1,411 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+use super::ramfs::RamDirectory;
+use super::*;
+
+use crate::error::SvsmError;
+use crate::locking::SpinLock;
+
+use core::cmp::min;
+
+extern crate alloc;
+use alloc::s... | There is no check for existing file handles being opened against the same file meaning there could be concurrent changes to the file contents and size. Is that something that should be protected against? |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,89 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+extern crate alloc;
+use alloc::sync::Arc;
+use alloc::vec::Vec;
+
+use crate::error::SvsmError;
+use crate::string::FixedString;
+
+/// Maximum supported length for a si... | Any particular reason we have these constructors? If not, just as a suggestion, we could probably get away with simply constructing the particular variant inline wherever needed. |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,95 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+extern crate alloc;
+use alloc::sync::Arc;
+use alloc::vec::Vec;
+
+use crate::error::SvsmError;
+use crate::string::FixedString;
+
+/// Maximum supported length for a si... | This could be shortened to:
```rust
pub fn is_file(&self) -> bool {
matches!(self, Self::File(_))
}
```
Same for `is_dir()` below. |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,95 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+extern crate alloc;
+use alloc::sync::Arc;
+use alloc::vec::Vec;
+
+use crate::error::SvsmError;
+use crate::string::FixedString;
+
+/// Maximum supported length for a si... | Field names can be omitted here (clippy will complain) |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,258 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+extern crate alloc;
+use super::*;
+use crate::error::SvsmError;
+use crate::locking::SpinLock;
+use crate::mm::{allocate_file_page_ref, PageRef};
+use crate::types::PAG... | This addition could overflow if the caller supplies a big enough offset. Perhaps we could use `checked_add` to harden it against these edge cases:
```rust
let capacity = offset.checked_add(len)
.ok_or(SvsmError::FileSystem(FsError::inval()))?;
self.set_capacity(capacity)?;
``` |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,258 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+extern crate alloc;
+use super::*;
+use crate::error::SvsmError;
+use crate::locking::SpinLock;
+use crate::mm::{allocate_file_page_ref, PageRef};
+use crate::types::PAG... | Same here, `current + page_len` could overflow with a big enough offset. |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,174 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+use crate::address::{Address, PhysAddr};
+use crate::error::SvsmError;
+use crate::mm::ptguards::PerCPUPageMappingGuard;
+
+use super::*;
+
+extern crate alloc;
+use all... | Since this structure is not pub, its methods don't need to be pub either. pub only affects visibility at the module level. |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,174 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+use crate::address::{Address, PhysAddr};
+use crate::error::SvsmError;
+use crate::mm::ptguards::PerCPUPageMappingGuard;
+
+use super::*;
+
+extern crate alloc;
+use all... | We should probably replace the `unwrap()` after `try_into()` with a returned SvsmError. On top of that, we could also check the magic bytes at the end of `load()`, returning an error if they do not match. |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,174 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+use crate::address::{Address, PhysAddr};
+use crate::error::SvsmError;
+use crate::mm::ptguards::PerCPUPageMappingGuard;
+
+use super::*;
+
+extern crate alloc;
+use all... | Same here. Since this function can fail in multiple places, perhaps we could return a `Result<Self, SvsmError>`. As before, we could move the check in `valid()` to this function. |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,174 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+use crate::address::{Address, PhysAddr};
+use crate::error::SvsmError;
+use crate::mm::ptguards::PerCPUPageMappingGuard;
+
+use super::*;
+
+extern crate alloc;
+use all... | We can remove the unwrap with `let-else` syntax:
```rust
let Ok(name) = String::from_utf8(Vec::from(&buf[12..header_len])) else {
return FileHeader::new();
};
FileHeader { hdr_type, name_len, file_size, name }
``` |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,174 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+use crate::address::{Address, PhysAddr};
+use crate::error::SvsmError;
+use crate::mm::ptguards::PerCPUPageMappingGuard;
+
+use super::*;
+
+extern crate alloc;
+use all... | Returning `&str` here is a bit more conventional. |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,174 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+use crate::address::{Address, PhysAddr};
+use crate::error::SvsmError;
+use crate::mm::ptguards::PerCPUPageMappingGuard;
+
+use super::*;
+
+extern crate alloc;
+use all... | This is fine, but we could also use the question mark operator. |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,174 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+use crate::address::{Address, PhysAddr};
+use crate::error::SvsmError;
+use crate::mm::ptguards::PerCPUPageMappingGuard;
+
+use super::*;
+
+extern crate alloc;
+use all... | These look dangerous to me, especially the second one, for two reasons: they could go out of bounds in `data`, and they could overflow when adding them.
`current` comes from `PackItHeader::len()`, which returns `PackItHeader::header_size`, which is never validated (although it is bounded by `size` in this loop). `Fi... |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,174 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+use crate::address::{Address, PhysAddr};
+use crate::error::SvsmError;
+use crate::mm::ptguards::PerCPUPageMappingGuard;
+
+use super::*;
+
+extern crate alloc;
+use all... | This can also overflow, since the addition is done before the conversion to `usize`. |
svsm | github_2023 | others | 27 | coconut-svsm | osteffenrh | @@ -0,0 +1,263 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+extern crate alloc;
+use super::*;
+use crate::error::SvsmError;
+use crate::locking::RWLock;
+use crate::mm::{allocate_file_page_ref, PageRef};
+use crate::types::PAGE_... | I would zero `buf1` before reading into it, to make sure it does not already contain the data we are looking for. |
svsm | github_2023 | others | 27 | coconut-svsm | osteffenrh | @@ -0,0 +1,263 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+extern crate alloc;
+use super::*;
+use crate::error::SvsmError;
+use crate::locking::RWLock;
+use crate::mm::{allocate_file_page_ref, PageRef};
+use crate::types::PAGE_... | dito |
svsm | github_2023 | others | 27 | coconut-svsm | osteffenrh | @@ -0,0 +1,263 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+extern crate alloc;
+use super::*;
+use crate::error::SvsmError;
+use crate::locking::RWLock;
+use crate::mm::{allocate_file_page_ref, PageRef};
+use crate::types::PAGE_... | and here |
svsm | github_2023 | others | 27 | coconut-svsm | roy-hopkins | @@ -0,0 +1,263 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+extern crate alloc;
+use super::*;
+use crate::error::SvsmError;
+use crate::locking::RWLock;
+use crate::mm::{allocate_file_page_ref, PageRef};
+use crate::types::PAGE_... | The remaining bytes between self.size and self.capacity should be zeroed to prevent previous file contents being visible if the file is increased in size again. |
svsm | github_2023 | others | 27 | coconut-svsm | roy-hopkins | @@ -197,7 +197,7 @@ global_asm!(
shrq $3, %rcx
rep stosq
- popq %rdi
+ movq %rsi, %rdi | Are the top 32 bits of %rsi guaranteed to be zero after switching from 32-bit to 64-bit mode? |
svsm | github_2023 | others | 27 | coconut-svsm | osteffenrh | @@ -0,0 +1,465 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+use super::ramfs::RamDirectory;
+use super::*;
+
+use crate::error::SvsmError;
+use crate::locking::SpinLock;
+
+use core::cmp::min;
+
+extern crate alloc;
+use alloc::s... | Why this check here?
This should not happen, because `split_paths_allow_empty` filters these.
Somehow I would have expected this check in the lower level create function(s).
But if it is desired/needed here, then I would also expect it for `mkdir()`? |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,163 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+use crate::address::{Address, PhysAddr};
+use crate::error::SvsmError;
+use crate::mm::ptguards::PerCPUPageMappingGuard;
+
+use super::*;
+
+extern crate alloc;
+use all... | I'd vote to return an error here instead to keep everything consistent. |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,163 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+use crate::address::{Address, PhysAddr};
+use crate::error::SvsmError;
+use crate::mm::ptguards::PerCPUPageMappingGuard;
+
+use super::*;
+
+extern crate alloc;
+use all... | Same here, returning an error seems more natural. |
svsm | github_2023 | others | 27 | coconut-svsm | 00xc | @@ -0,0 +1,163 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Joerg Roedel <jroedel@suse.de>
+
+use crate::address::{Address, PhysAddr};
+use crate::error::SvsmError;
+use crate::mm::ptguards::PerCPUPageMappingGuard;
+
+use super::*;
+
+extern crate alloc;
+use all... | Field could be omitted here, clippy will complain. |
svsm | github_2023 | others | 28 | coconut-svsm | roy-hopkins | @@ -467,6 +479,20 @@ impl PerCpu {
base: (&self.tss as *const X86Tss) as u64,
}
}
+
+ pub fn virt_range_init(&mut self) {
+ // Initialize 4k range
+ let page_count = (SVSM_PERCPU_TEMP_END_4K - SVSM_PERCPU_TEMP_BASE_4K) / PAGE_SIZE;
+ assert!(page_count <= VirtualRange:... | I've just noticed a bug (my bug) in the VirtualRange initialisation. `VirtualRange::alloc()` returns a contiguous virtual address range based on the allocated page count therefore it needs to know the page size. At the moment it incorrectly assumes it's 4k. Therefore the `init()` function will need to take the page siz... |
svsm | github_2023 | others | 21 | coconut-svsm | Freax13 | @@ -0,0 +1,1612 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Nicolai Stange <nstange@suse.de>
+//
+// vim: ts=4 sw=4 et
+
+extern crate alloc;
+
+use alloc::vec::Vec;
+use bitflags::bitflags;
+use core::cmp;
+use core::convert;
+use core::ffi;
+use core::... | Have you considered using the [thiserror](https://docs.rs/thiserror/latest/thiserror/) crate? |
svsm | github_2023 | others | 21 | coconut-svsm | Freax13 | @@ -0,0 +1,1612 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Nicolai Stange <nstange@suse.de>
+//
+// vim: ts=4 sw=4 et
+
+extern crate alloc;
+
+use alloc::vec::Vec;
+use bitflags::bitflags;
+use core::cmp;
+use core::convert;
+use core::ffi;
+use core::... | ```suggestion
// be needed at each and every subsequent access.
``` |
svsm | github_2023 | others | 21 | coconut-svsm | Freax13 | @@ -0,0 +1,1612 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Nicolai Stange <nstange@suse.de>
+//
+// vim: ts=4 sw=4 et
+
+extern crate alloc;
+
+use alloc::vec::Vec;
+use bitflags::bitflags;
+use core::cmp;
+use core::convert;
+use core::ffi;
+use core::... | ```suggestion
fn total_vaddr_range(&self) -> Elf64AddrRange {
Elf64AddrRange {
vaddr_begin: self
.segments
.first()
.map_or(0, |first| first.0.vaddr_begin),
vaddr_end: self
.segments
.last()
... |
svsm | github_2023 | others | 21 | coconut-svsm | Freax13 | @@ -0,0 +1,1612 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Nicolai Stange <nstange@suse.de>
+//
+// vim: ts=4 sw=4 et
+
+extern crate alloc;
+
+use alloc::vec::Vec;
+use bitflags::bitflags;
+use core::cmp;
+use core::convert;
+use core::ffi;
+use core::... | ```suggestion
for entry_buf in buf.chunks(16) {
``` |
svsm | github_2023 | others | 21 | coconut-svsm | Freax13 | @@ -0,0 +1,1612 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Nicolai Stange <nstange@suse.de>
+//
+// vim: ts=4 sw=4 et
+
+extern crate alloc;
+
+use alloc::vec::Vec;
+use bitflags::bitflags;
+use core::cmp;
+use core::convert;
+use core::ffi;
+use core::... | Have you considered using the [bytemuck](https://docs.rs/bytemuck/1.13.1/bytemuck/) crate? It can be used to cast bytes to a struct. |
svsm | github_2023 | others | 21 | coconut-svsm | Freax13 | @@ -0,0 +1,1612 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+//
+// Copyright (c) 2023 SUSE LLC
+//
+// Author: Nicolai Stange <nstange@suse.de>
+//
+// vim: ts=4 sw=4 et
+
+extern crate alloc;
+
+use alloc::vec::Vec;
+use bitflags::bitflags;
+use core::cmp;
+use core::convert;
+use core::ffi;
+use core::... | This function is unused. |
svsm | github_2023 | others | 21 | coconut-svsm | Freax13 | @@ -105,151 +107,176 @@ fn setup_env() {
sev_status_verify();
}
-fn map_kernel_region(vaddr: VirtAddr, region: &MemoryRegion) -> Result<(), SvsmError> {
+fn map_and_validate(vaddr: VirtAddr, paddr: PhysAddr, len: usize) {
let flags = PTEntryFlags::PRESENT
| PTEntryFlags::WRITABLE
| PTEntr... | ```suggestion
panic!("failed to read ELF relocations : {e}");
```
The same change can be applied in a few more places. |
svsm | github_2023 | others | 21 | coconut-svsm | Freax13 | @@ -8,11 +8,24 @@
#[repr(C)]
pub struct KernelLaunchInfo {
/// Start of the kernel in physical memory.
- pub kernel_start: u64,
+ pub kernel_region_phys_start: u64,
/// Exclusive end of the kernel in physical memory.
- pub kernel_end: u64,
- pub virt_base: u64,
+ pub kernel_region_phys_end: u... | Items are usually documented with triple slash comments before the item. That way the comments are recognized as public documentation and are displayed in rustdoc generated docs. Some IDEs also support such doc comments:
 {
- let (i, _) = self.index(self.pend - 1);
+ let (mut i, bit) = self.index(self.pend);
+ if bit != 0 {
+ i += 1;
+ }
let index: usize = i.try_into().unwrap();
unsafe {
- ... | This causes a crash in debug builds for me. ptr::write_bytes() already writes count*size_of<T>() bytes, no need to multiply by 8. |
rill-flow | github_2023 | java | 90 | weibocom | qdaxb | @@ -0,0 +1,355 @@
+package com.weibo.rill.flow.service.strategies; | 没有copyright |
rill-flow | github_2023 | others | 90 | weibocom | qdaxb | @@ -0,0 +1,31 @@
+package com.weibo.rill.flow.service.strategies | 没有copyright |
rill-flow | github_2023 | others | 90 | weibocom | qdaxb | @@ -0,0 +1,73 @@
+package com.weibo.rill.flow.service.strategies | 没有copyright |
rill-flow | github_2023 | others | 90 | weibocom | qdaxb | @@ -1,46 +1,46 @@
-package com.weibo.rill.flow.service.statistic
-
-import com.weibo.rill.flow.olympicene.core.switcher.SwitcherManager
-import com.weibo.rill.flow.olympicene.storage.exception.StorageException
-import com.weibo.rill.flow.service.dconfs.BizDConfs
-import spock.lang.Specification
-
-class DAGSubmi... | 没有copyright |
rill-flow | github_2023 | others | 90 | weibocom | qdaxb | @@ -1,21 +1,21 @@
-package com.weibo.rill.flow.service.statistic
-
-import com.alibaba.fastjson.JSONObject
-import spock.lang.Specification
-import spock.lang.Unroll
-
-class DAGResourceStatisticTest extends Specification {
- DAGResourceStatistic statistic = new DAGResourceStatistic()
-
- @Unroll
- d... | 没有copyright |
rill-flow | github_2023 | java | 90 | weibocom | qdaxb | @@ -0,0 +1,52 @@
+/*
+ * Copyright 2021-2023 Weibo, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * ... | 没有注释,看不懂这个类是做什么的 |
rill-flow | github_2023 | java | 90 | weibocom | qdaxb | @@ -0,0 +1,35 @@
+/*
+ * Copyright 2021-2023 Weibo, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * ... | 类名是Strategy,但方法看更像是listener |
rill-flow | github_2023 | java | 90 | weibocom | qdaxb | @@ -0,0 +1,52 @@
+/*
+ * Copyright 2021-2023 Weibo, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * ... | 看不懂`context.onXXX`的语义 |
rill-flow | github_2023 | java | 90 | weibocom | qdaxb | @@ -0,0 +1,52 @@
+/*
+ * Copyright 2021-2023 Weibo, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * ... | 没有注释,看不懂`CUSTOM_STRATEGY`是做什么的 |
rill-flow | github_2023 | java | 90 | weibocom | qdaxb | @@ -152,7 +156,13 @@ public class DescriptorManager {
public String getDagDescriptor(Long uid, Map<String, Object> input, String dagDescriptorId) {
// 调用量比较小 useCache为false 实时取最新的yaml保证更新会立即生效
- return getDagDescriptorWithCache(uid, input, dagDescriptorId, false);
+ String descriptor = get... | `getDagDescriptor`和`getDagDescriptorForClient`返回的`DagDescripter`有什么区别,如果是两种`DagDescriptor`,是否能区分不同的`DagDescriptor`类? |
rill-flow | github_2023 | java | 90 | weibocom | qdaxb | @@ -201,26 +201,74 @@ public Map<String, Object> setValue(Map<String, Object> map, Object value, Strin
while (matcher.find()) {
if (matcher.group(1) != null) {
jsonPathParts.add(matcher.group(1));
- } else if (matcher.group(2) != null) {
- jsonPathParts.a... | 注释没有比函数名提供更多信息 |
rill-flow | github_2023 | java | 90 | weibocom | qdaxb | @@ -201,26 +201,74 @@ public Map<String, Object> setValue(Map<String, Object> map, Object value, Strin
while (matcher.find()) {
if (matcher.group(1) != null) {
jsonPathParts.add(matcher.group(1));
- } else if (matcher.group(2) != null) {
- jsonPathParts.a... | 注释没有比函数名提供更多信息 |
rill-flow | github_2023 | java | 86 | weibocom | github-advanced-security[bot] | @@ -0,0 +1,139 @@
+/*
+ * Copyright 2021-2023 Weibo, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * ... | ## Server-side requests should not be vulnerable to forging attacks
<!--SONAR_ISSUE_KEY:AZIjIfKadMY2tUEHm0UQ-->Change this code to not construct the URL from user-controlled data. <p>See more on <a href="https://sonarcloud.io/project/issues?id=weibocom_rill-flow&issues=AZIjIfKadMY2tUEHm0UQ&open=AZIjIfKadMY2tUEHm0UQ&pu... |
rill-flow | github_2023 | java | 86 | weibocom | github-advanced-security[bot] | @@ -0,0 +1,148 @@
+/*
+ * Copyright 2021-2023 Weibo, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * ... | ## Server-side requests should not be vulnerable to forging attacks
<!--SONAR_ISSUE_KEY:AZIjKFHQyEi49Sr8X5_U-->Change this code to not construct the URL from user-controlled data. <p>See more on <a href="https://sonarcloud.io/project/issues?id=weibocom_rill-flow&issues=AZIjKFHQyEi49Sr8X5_U&open=AZIjKFHQyEi49Sr8X5_U&pu... |
rill-flow | github_2023 | java | 73 | weibocom | qdaxb | @@ -177,19 +182,37 @@ public Map<String, Object> setValue(Map<String, Object> map, Object value, Strin
return null;
}
- List<String> intermediateRoute = Lists.newArrayList();
- for (int i = 0; i < path.length(); i++) {
- if (path.charAt(i) == '.') {
- inte... | 提取到成员变量 |
rill-flow | github_2023 | others | 34 | weibocom | qdaxb | @@ -0,0 +1,23 @@
+CREATE DATABASE IF NOT EXISTS rill_flow;
+USE rill_flow;
+CREATE TABLE IF NOT EXISTS `task_template` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `name` varchar(64) NOT NULL DEFAULT '' COMMENT '模板名称', | comment改英文 |
rill-flow | github_2023 | java | 34 | weibocom | qdaxb | @@ -0,0 +1,250 @@
+/*
+ * Copyright 2021-2023 Weibo, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * ... | magic number |
rill-flow | github_2023 | java | 34 | weibocom | qdaxb | @@ -0,0 +1,250 @@
+/*
+ * Copyright 2021-2023 Weibo, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * ... | magic number |
rill-flow | github_2023 | java | 34 | weibocom | qdaxb | @@ -0,0 +1,33 @@
+/*
+ * Copyright 2021-2023 Weibo, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * ... | 没有注释 |
rill-flow | github_2023 | others | 27 | weibocom | qdaxb | @@ -0,0 +1,174 @@
+name: Deploy and Test
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ types: [ opened, synchronize, reopened ]
+jobs:
+ test:
+ name: Deploy and Test
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ - name:... | 应该用测试框架执行测试。 |
rill-flow | github_2023 | others | 27 | weibocom | qdaxb | @@ -0,0 +1,174 @@
+name: Deploy and Test
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ types: [ opened, synchronize, reopened ]
+jobs:
+ test:
+ name: Deploy and Test
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ - name:... | setupjdk里包含maven |
rill-flow | github_2023 | others | 27 | weibocom | qdaxb | @@ -0,0 +1,174 @@
+name: Deploy and Test
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ types: [ opened, synchronize, reopened ]
+jobs:
+ test:
+ name: Deploy and Test
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ - name:... | package包含test |
rill-flow | github_2023 | others | 27 | weibocom | qdaxb | @@ -33,13 +33,13 @@ jobs:
- name: Build and analyze
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- run: mvn -B clean javadoc:javadoc clean verify -P coverage -DskipITs=false -Dmaven.test.skip=false
+ run: mvn -B clean javadoc:javadoc clean verify -P coverage -DskipITs=false ... | 应该默认不运行rill-flow-test,而不是显式指定不运行 |
rill-flow | github_2023 | others | 27 | weibocom | qdaxb | @@ -0,0 +1,170 @@
+package com.weibo.rill.flow.sample
+
+import org.apache.http.HttpEntity
+import org.apache.http.HttpResponse
+import org.apache.http.client.HttpClient
+import org.apache.http.client.methods.HttpPost
+import org.apache.http.entity.ContentType
+import org.apache.http.entity.StringEntity
+import org.apa... | 应该使用spock的`Stepwise`来顺序执行测试 |
rill-flow | github_2023 | others | 27 | weibocom | qdaxb | @@ -0,0 +1,170 @@
+package com.weibo.rill.flow.sample
+
+import org.apache.http.HttpEntity
+import org.apache.http.HttpResponse
+import org.apache.http.client.HttpClient
+import org.apache.http.client.methods.HttpPost
+import org.apache.http.entity.ContentType
+import org.apache.http.entity.StringEntity
+import org.apa... | 这里没有使用spock的基本测试格式 |
rill-flow | github_2023 | others | 27 | weibocom | qdaxb | @@ -0,0 +1,170 @@
+package com.weibo.rill.flow.sample
+
+import org.apache.http.HttpEntity
+import org.apache.http.HttpResponse
+import org.apache.http.client.HttpClient
+import org.apache.http.client.methods.HttpPost
+import org.apache.http.entity.ContentType
+import org.apache.http.entity.StringEntity
+import org.apa... | 这里没有使用spock风格的assert |
rill-flow | github_2023 | others | 27 | weibocom | qdaxb | @@ -0,0 +1,170 @@
+package com.weibo.rill.flow.sample
+
+import org.apache.http.HttpEntity
+import org.apache.http.HttpResponse
+import org.apache.http.client.HttpClient
+import org.apache.http.client.methods.HttpPost
+import org.apache.http.entity.ContentType
+import org.apache.http.entity.StringEntity
+import org.apa... | 可以直接用map,不需要单独定义类 |
rill-flow | github_2023 | others | 27 | weibocom | qdaxb | @@ -0,0 +1,170 @@
+package com.weibo.rill.flow.sample
+
+import org.apache.http.HttpEntity
+import org.apache.http.HttpResponse
+import org.apache.http.client.HttpClient
+import org.apache.http.client.methods.HttpPost
+import org.apache.http.entity.ContentType
+import org.apache.http.entity.StringEntity
+import org.apa... | 可以直接用`jsonslurper`解析 |
rill-flow | github_2023 | others | 27 | weibocom | qdaxb | @@ -0,0 +1,170 @@
+package com.weibo.rill.flow.sample
+
+import org.apache.http.HttpEntity
+import org.apache.http.HttpResponse
+import org.apache.http.client.HttpClient
+import org.apache.http.client.methods.HttpPost
+import org.apache.http.entity.ContentType
+import org.apache.http.entity.StringEntity
+import org.apa... | ```return new File('/path/to/file').text``` |
rill-flow | github_2023 | others | 27 | weibocom | qdaxb | @@ -0,0 +1,170 @@
+package com.weibo.rill.flow.sample
+
+import org.apache.http.HttpEntity
+import org.apache.http.HttpResponse
+import org.apache.http.client.HttpClient
+import org.apache.http.client.methods.HttpPost
+import org.apache.http.entity.ContentType
+import org.apache.http.entity.StringEntity
+import org.apa... | 只验证了状态码,没有验证返回内容和图的业务结果 |
rill-flow | github_2023 | others | 17 | weibocom | qdaxb | @@ -0,0 +1,50 @@
+version: '3'
+services:
+ rill-flow-textGatherer:
+ image: <repository>/rill-flow-textgatherer:0.0.1
+ ports:
+ - "9000:9000"
+ volumes:
+ - "/tmp:/tmp"
+ environment:
+ - PROXY_RILL_FLOW_DOMAIN="<rill-flow-ip>" | 应该是`RILL_FLOW_HOST` |
rill-flow | github_2023 | others | 17 | weibocom | qdaxb | @@ -0,0 +1,50 @@
+version: '3'
+services:
+ rill-flow-textGatherer:
+ image: <repository>/rill-flow-textgatherer:0.0.1
+ ports:
+ - "9000:9000"
+ volumes:
+ - "/tmp:/tmp"
+ environment:
+ - PROXY_RILL_FLOW_DOMAIN="<rill-flow-ip>"
+ - PROXY_RILL_FLOW_PORT=8080 | 应该是`RILL_FLOW_PORT` |
rill-flow | github_2023 | others | 17 | weibocom | qdaxb | @@ -0,0 +1,60 @@
+version: 0.0.1
+type: flow
+workspace: rillFlow
+dagName: digitalHuman
+tasks:
+ - category: function
+ name: textGatherer
+ pattern: task_async
+ resourceName: http://<rill-flow-textGatherer-ip>:9000/scrape | 应该是`textGatherer-executor-host` |
rill-flow | github_2023 | others | 17 | weibocom | qdaxb | @@ -0,0 +1,60 @@
+version: 0.0.1
+type: flow
+workspace: rillFlow
+dagName: digitalHuman
+tasks:
+ - category: function
+ name: textGatherer
+ pattern: task_async
+ resourceName: http://<rill-flow-textGatherer-ip>:9000/scrape
+ inputMappings:
+ - target: $.input.paragraph_limit
+ source: $.cont... | `bark-executor-host` |
rill-flow | github_2023 | others | 17 | weibocom | qdaxb | @@ -0,0 +1,60 @@
+version: 0.0.1
+type: flow
+workspace: rillFlow
+dagName: digitalHuman
+tasks:
+ - category: function
+ name: textGatherer
+ pattern: task_async
+ resourceName: http://<rill-flow-textGatherer-ip>:9000/scrape
+ inputMappings:
+ - target: $.input.paragraph_limit
+ source: $.cont... | `wav2lip-executor-host` |
rill-flow | github_2023 | others | 17 | weibocom | qdaxb | @@ -0,0 +1,60 @@
+version: 0.0.1
+type: flow
+workspace: rillFlow
+dagName: digitalHuman
+tasks:
+ - category: function
+ name: textGatherer
+ pattern: task_async
+ resourceName: http://<rill-flow-textGatherer-ip>:9000/scrape
+ inputMappings:
+ - target: $.input.paragraph_limit
+ source: $.cont... | `mergevideo-executor-host` |
rill-flow | github_2023 | others | 17 | weibocom | qdaxb | @@ -0,0 +1,23 @@
+FROM continuumio/miniconda3
+RUN conda create --name moviepy python=3.10
+RUN echo "conda activate moviepy" >> ~/.bashrc
+ENV PATH /opt/conda/envs/moviepy/bin:$PATH
+
+# install dependency
+RUN sed -i 's/deb.debian.org/mirrors.tencent.com/g' /etc/apt/sources.list
+RUN apt-get update && apt-get install... | 这个应该动态生成 |
rill-flow | github_2023 | java | 15 | weibocom | qdaxb | @@ -152,11 +156,23 @@ public Map<String, Object> getExecution(
) {
Map<String, Object> result = dagRuntimeFacade.getBasicDAGInfo(executionId, false);
- String traceId = redisClient.get(TRACE_ID_PREFIX + executionId);
- result.put("trace_uri", "/trace/" + traceId);
+ appendTraceInfo(... | 应该是result.put("trace_url",`buildTraceInfo`) |
rill-flow | github_2023 | java | 15 | weibocom | qdaxb | @@ -43,6 +44,9 @@ public class BgController {
private static final String BUSINESS_IDS = "business_ids";
private static final String TRACE_ID_PREFIX = "trace_id_";
+ @Value("${rill_flow_trace_query_url}") | 应该是`rill_flow_trace_query_host` |
rill-flow | github_2023 | others | 9 | weibocom | qdaxb | @@ -98,6 +98,11 @@
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-autoconfigure</artifactId>
+ <version>2.7.18</... | remove version |
rill-flow | github_2023 | others | 9 | weibocom | qdaxb | @@ -21,7 +21,5 @@ rill_flow_auth_secret_key=a819796893fad1350e6bc17548e8f02e
rill_flow_dag_redo_url=http://127.0.0.1:8080/flow/redo.json
spring.kafka.producer.bootstrap-servers=127.0.0.1:9092 | remove it |
zig-objc | github_2023 | others | 3 | mitchellh | mitchellh | @@ -0,0 +1,316 @@
+const std = @import("std");
+const objc = @import("main.zig");
+
+const NSConcreteStackBlock = @extern(*anyopaque, .{ .name = "_NSConcreteStackBlock" });
+extern "C" fn _Block_object_assign(dst: *anyopaque, src: *const anyopaque, flag: c_int) void;
+extern "C" fn _Block_object_dispose(src: *const any... | Just want to confirm: I don't see a reason this has to be hardcoded to the c allocator, is there? Is there any reason we can't take an `Allocator` param? |
libxev | github_2023 | others | 147 | mitchellh | unexge | @@ -1,10 +1,29 @@
const std = @import("std");
+const builtin = @import("builtin");
const assert = std.debug.assert;
const linux = std.os.linux;
const posix = std.posix;
const queue = @import("../queue.zig");
const xev = @import("../main.zig").IO_Uring;
+/// True if this backend is available on this platform.
+p... | Shouldn't this return false? Though probably doesn't matter as `Backend.candidates()` only returns this on Linux |
libxev | github_2023 | others | 119 | mitchellh | mitchellh | @@ -744,6 +744,7 @@ pub const Completion = struct {
@intCast(res)
else switch (@as(posix.E, @enumFromInt(-res))) {
.CANCELED => error.Canceled,
+ .INTR => error.SignalInterrupt, | Hm. I'm thinking there's no downside to rearming here and we should do that. Any thoughts? |
libxev | github_2023 | others | 95 | mitchellh | fallenwood | @@ -208,7 +208,7 @@ And in your `build.zig`:
```zig
const xev = b.dependency("libxev", .{ .target = target, .optimize = optimize });
-exe.addModule("xev", xev.module("xev"));
+exe.root_module.addImport("xev", libxev_dep.module("xev")); | it should be `exe.root_module.addImport("xev", xev.module("xev"));`, right? the variable `libxev_dep` is not defined |
libxev | github_2023 | others | 16 | mitchellh | mitchellh | @@ -75,6 +76,7 @@ fn asyncCallback(
}
fn threadMain(loop: *xev.Loop) !void {
- while (state == .running) try notifier.notify(loop);
+ while (state == .running) try notifier.notify();
state = .stopped;
+ _ = loop;
} | We can just not pass the loop into the thread anymore. |
3d-ascii-viewer | github_2023 | c | 13 | autopawn | autopawn | @@ -454,3 +454,127 @@ struct model *model_load_from_obj(const char *fname, bool color_support)
model_validate_idxs(model);
return model;
}
+
+struct model *model_load_from_stl(const char *fname)
+{
+ FILE *fp = fopen(fname, "rb");
+ if (!fp)
+ {
+ fprintf(stderr, "ERROR: failed to load file \... | If I am not mistaken, this assumes that the processor is little-endian, which I think is pretty reasonable these days. Still, it would be good to add a comment:
```
// NOTE: Assuming little-endian hardware.
``` |
3d-ascii-viewer | github_2023 | c | 13 | autopawn | autopawn | @@ -454,3 +454,127 @@ struct model *model_load_from_obj(const char *fname, bool color_support)
model_validate_idxs(model);
return model;
}
+
+struct model *model_load_from_stl(const char *fname)
+{
+ FILE *fp = fopen(fname, "rb");
+ if (!fp)
+ {
+ fprintf(stderr, "ERROR: failed to load file \... | Should we make sure that this call to `fread` returns 50? |
3d-ascii-viewer | github_2023 | c | 13 | autopawn | autopawn | @@ -495,9 +502,28 @@ int main(int argc, char *argv[])
struct model *model;
- if (!(model = model_load_from_obj(args.input_file, args.color_support)))
- return 1;
- model_invert_z(model); // Required by the OBJ format.
+ const char *fileExt = get_file_extension(args.input_file);
+ if (fileExt... | In case `args.color_support` is true, it may be good to print a warning indicating that stl doesn't have material data. |
3d-ascii-viewer | github_2023 | c | 13 | autopawn | autopawn | @@ -570,7 +570,7 @@ struct model *model_load_from_stl(const char *fname)
// For every 3 vertices create a face
for (int i = 0; i < model->vertex_count; i += 3)
{
- model_add_face(model, i, i+1, i+2, current_material);
+ model_add_face(model, i, i+2, i+1, current_material); | I would squash this patch with the previous one, since this flipping of the face directions is required exactly when the axes are swapped. |
Awesome-Dev-Portfolios | github_2023 | others | 199 | Kiran1689 | Kiran1689 | @@ -1,7 +1,7 @@
{
"username": "jasmeetsinghbhatia",
"name": "Jasmeet Singh",
- "image": "https://github.com/Kiran1689/Awesome-Dev-Portfolios/assets/5153163/f2b5a30a-60ff-4523-a951-aa8e3c6d0b96",
+ "image": "https://github.com/Kiran1689/Awesome-Dev-Portfolios/assets/75929997/a28debcf-df61-4498-aef8-6348... | Please add , at the end |
Awesome-Dev-Portfolios | github_2023 | others | 135 | Kiran1689 | Kiran1689 | @@ -0,0 +1,12 @@
+{
+ "username": "Matt-code-d",
+ "name": "Matteo Santoro D",
+ "image": "https://i.imgur.com/r0KKbj3.png",
+ "technologiesUsed": "HTML · CSS · JavaScript · WebGL · Construct3", | This won't work.
Add comma separated values for **technologiesUsed**
Make sure that your portfolio image is **1900x900**.
|
Awesome-Dev-Portfolios | github_2023 | others | 122 | Kiran1689 | Kiran1689 | @@ -0,0 +1,10 @@
+{
+ "username": "LuisJimenez19",
+ "name": "Luis Ángel Jimenez",
+ "image": "https://github.com/Kiran1689/Awesome-Dev-Portfolios/assets/102745510/5e94fd47-c62f-42c1-8fa3-91072d5a1437", | Resize your image, the image resolution should be **1900 x 900 (Width x Height)** |
Awesome-Dev-Portfolios | github_2023 | others | 20 | Kiran1689 | Kiran1689 | @@ -0,0 +1,10 @@
+{
+ "username": "Nailheart",
+ "name": "Yaroslav Lebedenko",
+ "image": "https://private-user-images.githubusercontent.com/48065097/292616139-4bf4225f-8472-4d90-be7d-0c5738940371.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImt... | Hi @Nailheart
Please change the image URL to : https://user-images.githubusercontent.com/48065097/292616139-4bf4225f-8472-4d90-be7d-0c5738940371.png |
Awesome-Dev-Portfolios | github_2023 | others | 13 | Kiran1689 | Kiran1689 | @@ -0,0 +1,10 @@
+{
+ "username": "mrepol742",
+ "name": "Melvin Jones Repol",
+ "image": "https://github-production-user-asset-6210df.s3.amazonaws.com/62317165/292488473-10556d1c-e8e5-4884-af75-781e7df4498e.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231222%2Fus-east-1%2Fs3%2Faws4... | Remove the credentials from the image URL.
Make it as:
"image": "https://github-production-user-asset-6210df.s3.amazonaws.com/62317165/292488473-10556d1c-e8e5-4884-af75-781e7df4498e.png" |
Awesome-Dev-Portfolios | github_2023 | others | 9 | Kiran1689 | Kiran1689 | @@ -0,0 +1,10 @@
+{
+ "username": "vishwasnavadak",
+ "name": "Vishwasa Navada K",
+ "image": "https://github-production-user-asset-6210df.s3.amazonaws.com/13111030/291629578-a8d255a5-d5f9-4efd-afc4-f3db1402dabc.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231219%2Fus-east-1%2Fs3%2F... | This image URL will not work.
Please change the image URL as per contribution guidelines.
Refer here: https://github.com/Kiran1689/Awesome-Dev-Portfolios/blob/main/CONTRIBUTING.md |
Awesome-Dev-Portfolios | github_2023 | others | 9 | Kiran1689 | Kiran1689 | @@ -0,0 +1,10 @@
+{
+ "username": "vishwasnavadak",
+ "name": "Vishwasa Navada K",
+ "image": "https://github-production-user-asset-6210df.s3.amazonaws.com/13111030/291629578-a8d255a5-d5f9-4efd-afc4-f3db1402dabc.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231219%2Fus-east-1%2Fs3%2F... | Please add "-"
"githubRepoLink": " - " |
Attend-and-Excite | github_2023 | python | 11 | yuval-alaluf | patrickvonplaten | @@ -1,224 +0,0 @@
-import inspect
| Let's please not delete this pipeline ;-) |
Attend-and-Excite | github_2023 | python | 11 | yuval-alaluf | patrickvonplaten | @@ -1,262 +1,584 @@
-from typing import List, Optional, Union, Tuple
-
| Could you move this pipeline into the following folder:
https://github.com/huggingface/diffusers/tree/main/src/diffusers/pipelines/stable_diffusion |
Attend-and-Excite | github_2023 | python | 11 | yuval-alaluf | AttendAndExcite | @@ -0,0 +1,108 @@
+import os | I am not sure we need to push this file, correct? |
Attend-and-Excite | github_2023 | others | 11 | yuval-alaluf | AttendAndExcite | @@ -0,0 +1,166 @@
+name: sd | I am not sure the changes to the environment are needed. If I am not mistaken, the code should work with the original `environment.yaml` file and if the code is compatible with `diffusers 0.12.1`, then the only change that should be needed is in the `requirements.txt` with updating the diffusers version. We should also... |
Attend-and-Excite | github_2023 | python | 11 | yuval-alaluf | AttendAndExcite | @@ -1,262 +1,584 @@
-from typing import List, Optional, Union, Tuple
-
-import numpy as np
-import torch
-from diffusers.schedulers import LMSDiscreteScheduler
-from torch.nn import functional as F
-
-from pipeline_stable_diffusion import StableDiffusionPipeline
-from utils.gaussian_smoothing import GaussianSmo... | Can remove the commented out code :) |
Attend-and-Excite | github_2023 | python | 11 | yuval-alaluf | AttendAndExcite | @@ -1,262 +1,584 @@
-from typing import List, Optional, Union, Tuple
-
-import numpy as np
-import torch
-from diffusers.schedulers import LMSDiscreteScheduler
-from torch.nn import functional as F
-
-from pipeline_stable_diffusion import StableDiffusionPipeline
-from utils.gaussian_smoothing import GaussianSmo... | I ran the code and got an exception here:
```
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.cuda.HalfTensor) should be the same
```
This was done when running `run.py` as follows:
```
python run.py --prompt "a cat and a dog" --seeds [0] --token_indices [2,5]
```
Are there any other ad... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.