Sequence 1 | Sequence 2 | Result |
---|---|---|
1 | 1 | |
4 | 4 | |
2 | 2 | |
3 | 3 |
This file contains 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
import numpy as np | |
import scipy | |
def ravel_image(img): | |
""" | |
Разворачивает изображения в одномерный массив с учетом батча | |
""" | |
assert 1 < len(img.shape) < 4 |
This file contains 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
name: Task0 tests | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9] |
This file contains 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
class Person { | |
let name: String | |
init(name: String) { self.name = name } | |
var apartment: Apartment? | |
deinit { print("\(name) is being deinitialized") } | |
} | |
class Apartment { | |
let unit: String | |
init(unit: String) { self.unit = unit } |
This file contains 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
class LogInState: ObservableObject { | |
@Published var isLoggedIn: Bool | |
init(isLoggedIn: Bool) { | |
self.isLoggedIn = isLoggedIn | |
} | |
func loggedOut() { | |
isLoggedIn = false | |
} |
This file contains 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
import ProjectDescription | |
import ProjectDescriptionHelpers | |
let project = Project( | |
name: Feature.Foo.rawValue, | |
targets: [ | |
.feature( | |
implementation: .Foo, | |
dependencies: [ | |
.feature(interface: .Biz), |
This file contains 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
ColumnsLayout(columnsNumber: 2) { | |
VStack { | |
Text("That's one view") | |
Image(systemName: "tortoise.fill") | |
} | |
.padding() | |
.border(.red) | |
Text("That's the second view ") | |
.padding() | |
.border(.red) |
This file contains 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
let data = [ | |
(text: "Nice", subtext: "Onborading sequence of screens"), | |
(text: "OK", subtext: "But how to do it with SwiftUI?"), | |
(text: "So that", subtext: "it is nice and shiny"), | |
] | |
let typeCommon: PathPresenter.PathType = | |
.animated( | |
transition: .asymmetric( | |
insertion: .move(edge: .trailing), |
This file contains 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
class MyThread: Thread { | |
override func main() { // Thread's starting point | |
print("Hi from thread") | |
} | |
} | |
let thread = MyThread() | |
thread.start() |
This file contains 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
import enum Accelerate.vDSP | |
struct AnimatableVector: VectorArithmetic { | |
var values: [Float] | |
static var zero = AnimatableVector(values: [0.0]) | |
static func + (lhs: AnimatableVector, rhs: AnimatableVector) -> AnimatableVector { | |
let count = min(lhs.values.count, rhs.values.count) | |
return AnimatableVector( |
NewerOlder