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 <utility> | |
#include <functional> | |
using std::function; | |
using std::move; | |
template <typename T, typename E> | |
class Result { | |
public: | |
static Result ok(const T &ok) { |
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
[package] | |
name = "ditto" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
thiserror = "1.0.56" | |
windows-sys = { version = "0.52.0", features = [ |
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
[ | |
{ | |
"atomic_number": 1, | |
"symbol": "H", | |
"name": "Hydrogen", | |
"atomic_mass": 1.008, | |
"cpk_hex_color": { | |
"red": 255, | |
"green": 255, | |
"blue": 255 |
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 <stdbool.h> | |
#include <stdio.h> | |
void print_array(int *array, int length) | |
{ | |
int last_index = length - 1; | |
printf("["); | |
for (int i = 0; i < last_index; 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
#include <iostream> | |
#include <cassert> | |
using std::cout; | |
template <typename T, size_t combination_length> | |
void _combinations(T array[], size_t array_length, void (*callback)(T *items[combination_length]), T *combination[combination_length], int start = 0, int level = 1) | |
{ | |
assert(combination_length <= array_length && "You can't have a combination that's larger than the original array."); |
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
final Tello tello = await Tello.tello(); | |
await tello.takeoff(); |
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
final Tello tello = await Tello.tello(); | |
await tello.flip(FlipDirection.back); |
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
/* Author Elijah Axel L. Ang */ | |
// If working on a local machine, define the arduino functions | |
// that are normally defined in the arduino environment so that | |
// the error checker doesn't freak out. | |
#if defined(linux) || defined(_WIN32) || defined(__APPLE__) | |
void tone(int pin, int frequency); | |
void tone(int pin, int frequency, int duration); | |
void noTone(int pin); |
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 <opencv2/opencv.hpp> | |
#include <opencv2/highgui.hpp> | |
using namespace cv; | |
const int rows = 216; | |
const int columns = 384; | |
const int chemicals = 2; | |
bool is_drawing = false; | |
int brush_size = 2; |
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 subprocess import run | |
from pathlib import Path | |
from re import sub | |
from sys import stdout, stderr, argv | |
from time import sleep | |
from traceback import print_exc | |
username = "" | |
def create_remote_repo(repo_folder_path: str): |
NewerOlder