This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.4.22 <0.9.0; | |
library console { | |
address constant CONSOLE_ADDRESS = | |
0x000000000000000000636F6e736F6c652e6c6f67; | |
function _sendLogPayloadImplementation(bytes memory payload) internal view { | |
address consoleAddress = CONSOLE_ADDRESS; | |
/// @solidity memory-safe-assembly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
println!("Hello, world!"); | |
} | |
mod token; | |
use rstest::rstest; | |
use token::access_token; | |
#[rstest] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::time::Duration; | |
pub async fn delayed_sum(a: u32, b: u32, delay: Duration) -> u32 { | |
async_std::task::sleep(delay).await; | |
a + b | |
} | |
pub fn delayed_threaded_sum(a: u32, b: u32, delay: Duration) -> u32 { | |
std::thread::sleep(delay); | |
a + b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/target | |
**/*.rs.bk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn selle(matrix: &impl MatrixTrait) -> Vec<(usize, usize)> { | |
let mut saddles = vec![]; | |
let (rows, cols) = matrix.size(); | |
let mins: Vec<_> = (0..cols).map(|c| matrix.col_min(c)).collect(); | |
for r in 0..rows { | |
if let Some(max) = matrix.row_max(r) { | |
for c in 0..cols { | |
if let Some(min) = mins[c] { | |
if matrix.get(r, c) >= max && matrix.get(r, c) <= min { | |
saddles.push((r, c)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/target | |
**/*.rs.bk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.idea | |
/target | |
**/*.rs.bk | |
Cargo.lock | |
mr.iml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dfedf | |
fqe | |
as |