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
def Settings( **kwargs ): | |
return { | |
'flags': [ '-x', 'c++', '-Wall', '-Wextra', '-Werror', '-std=c++23'], | |
} |
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
from abc import ABC, abstractmethod | |
import torch | |
from torch.nn.functional import one_hot | |
from dso.program import Program | |
class StateManager(ABC): | |
""" |
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 <string> | |
#include <string_view> | |
#include <catch2/catch_test_macros.hpp> | |
std::string left_pad(std::string_view str, std::size_t min_len) { | |
auto const pad_len = std::max<int>(0, min_len-str.length()); | |
return std::string(pad_len, ' ') + std::string(str); | |
} | |
TEST_CASE("left_pad") { |
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<stdlib.h> | |
#include<stdio.h> | |
int | |
main () | |
{ | |
int i; | |
char *str = getenv ("LANG"); | |
for (i = 0; str[i + 2] != 00; i++) |
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
/***************** | |
* INICIALIZATION * | |
******************/ | |
DROP TABLE IMPARTE; | |
DROP TABLE CALIFICACION; | |
DROP TABLE USUARIO; | |
DROP TABLE ALUMNO; | |
DROP TABLE ASIGNATURA; | |
DROP TABLE MASTER; |
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 = -IFTXUI/include | |
CXXFLAGS = -Wall -Wextra -pedantic -std=c++20 $(include) | |
LDFLAGS = -LFTXUI/build | |
LDLIBS = -lftxui-component -lftxui-dom -lftxui-screen | |
TARGET = learn_ftxui | |
all: $(TARGET) |
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 random | |
import numpy | |
import numpy.matlib | |
N = 10 | |
S = 3 | |
Omega = random.sample(range(N), S) | |
s = numpy.matlib.randn(S,1) |
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 <bits/stdc++.h> | |
struct p {int x, y; p(int ax, int ay) : x(ax), y(ay) {} p() : x(0), y(0) {} bool operator!=(const p &o) { return x != o.x || y != o.y; } }; | |
std::vector<std::pair<p, int>> read_input(); | |
int distance(p p1, p p2); | |
int main() | |
{ | |
auto sensors_and_distances = read_input(); |
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 functools | |
import sys | |
def compare(lleft, lright): | |
print(">> ", end='') | |
print(lleft) | |
print(">> ", end='') | |
print(lright) | |
lleftc = lleft.copy() |
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
HeatKernel | |
>> brain_bss_logdet_S_numGraphs | |
L2 S1 numGraphs2: success=9.900000e-01 time=4.414525e+01 | |
Uniform | |
>> brain_bss_logdet_S_numGraphs | |
L2 S1 numGraphs2: success=7.800000e-01 time=1.089144e+02 | |
L3 S1 numGraphs2: success=9.000000e-01 time=1.573157e+02 | |
L4 S1 numGraphs2: success=9.300000e-01 time=1.831644e+02 | |
L5 S1 numGraphs2: success=8.500000e-01 time=2.888297e+02 |
NewerOlder