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
enum Color: Int { | |
case green | |
} | |
struct Test { | |
static func f<A>(_ z: A) { | |
print("Not enum") | |
} | |
static func f<A>(_ z: A) where A == Color { |
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
terraform { | |
required_providers { | |
google = { | |
source = "hashicorp/google" | |
} | |
} | |
} | |
variable "instance_name_input" { | |
type = string | |
} |
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
new_img = np.zeros(img.shape) | |
new_img[:, :, 0] = conv1(img[:, :, 0], kernel, mode='reflect') | |
new_img[:, :, 1] = conv1(img[:, :, 1], kernel, mode='reflect') | |
new_img[:, :, 2] = conv1(img[:, :, 2], kernel, mode='reflect') | |
new_img[:, :, 0] = conv1(new_img[:, :, 0], kernel, mode='reflect', axis=0) | |
new_img[:, :, 1] = conv1(new_img[:, :, 1], kernel, mode='reflect', axis=0) | |
new_img[:, :, 2] = conv1(new_img[:, :, 2], kernel, mode='reflect', axis=0) |
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
------------Test int 100------------ | |
[Benchmark] Time elapsed: 1913 ns | |
[Benchmark] Time elapsed: 1570 ns | |
[Benchmark] Time elapsed: 1551 ns | |
[Benchmark] Time elapsed: 1550 ns | |
[Benchmark] Time elapsed: 1569 ns | |
[Benchmark] Time elapsed: 996 ns | |
[Benchmark] Time elapsed: 975 ns | |
[Benchmark] Time elapsed: 1005 ns | |
[Benchmark] Time elapsed: 1220 ns |
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
------------Test int 100------------ | |
[Benchmark] Time elapsed: 65849 ns | |
[Benchmark] Time elapsed: 65198 ns | |
[Benchmark] Time elapsed: 67855 ns | |
[Benchmark] Time elapsed: 65944 ns | |
[Benchmark] Time elapsed: 65239 ns | |
[Benchmark] Time elapsed: 66015 ns | |
[Benchmark] Time elapsed: 64729 ns | |
[Benchmark] Time elapsed: 64366 ns | |
[Benchmark] Time elapsed: 64205 ns |
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
int[] vectorCPP = {1, 2, 3, 4, ...}; | |
ArrayList<Integer> arrayListJava = new ArrayList<Integer>(length_of_vectorCPP); | |
for (int i: vectorCPP) { | |
Integer intObject = new Integer(i); | |
arrayListJava.Add(intObject); | |
} | |
return (List<Integer>) arrayListJava; |
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
#include <chrono> | |
#include <codecvt> | |
#include <iostream> | |
#include <locale> | |
#include <memory> | |
#include <stdexcept> | |
#include <string> | |
static std::string dummy; |
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
test | |
759 # 0 "" 2 | |
760 .LVL99: | |
761 #NO_APP | |
762 .LBB536: | |
763 .LBB537: | |
764 .loc 4 201 0 | |
765 vminss %xmm1, %xmm0, %xmm1 | |
766 .LVL100: | |
767 .LBE537: |
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
111 # rem | |
112 # 0 "" 2 | |
113 .LVL8: | |
114 .loc 1 18 0 discriminator 2 | |
115 # 18 "main.cc" 1 | |
116 # foo | |
117 # 0 "" 2 | |
118 .LVL9: | |
119 #NO_APP | |
120 movq %rax, %rcx |
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
function count(numOfVars, evaluate) { | |
const num = Math.pow(2, numOfVars); | |
let counter = 0; | |
for (let i = 0; i < num; i++) { | |
const evals = []; | |
for (let j = 0; j < numOfVars; j++) { | |
evals.push((i >> j) & 1); | |
} |
NewerOlder