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
| function! SetupIndentConceal() | |
| " Only for Python files | |
| if &ft != 'python' | return | endif | |
| " Clear previous syntax without erroring in case the group doesn't exist | |
| silent! syntax clear LeadingSpaceConceal | |
| " Required conceal settings | |
| set conceallevel=2 | |
| set concealcursor=nvic |
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
| def Settings( **kwargs ): | |
| return { | |
| 'flags': [ '-x', 'c++', '-Wall', '-Wextra', '-Werror', '-std=c++23'], | |
| } |
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
| 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 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
| #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 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
| #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 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
| /***************** | |
| * INICIALIZATION * | |
| ******************/ | |
| DROP TABLE IMPARTE; | |
| DROP TABLE CALIFICACION; | |
| DROP TABLE USUARIO; | |
| DROP TABLE ALUMNO; | |
| DROP TABLE ASIGNATURA; | |
| DROP TABLE MASTER; |
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
| 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 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
| 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 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
| #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 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
| import functools | |
| import sys | |
| def compare(lleft, lright): | |
| print(">> ", end='') | |
| print(lleft) | |
| print(">> ", end='') | |
| print(lright) | |
| lleftc = lleft.copy() |
NewerOlder