C++ links: Coroutines
https://github.com/MattPD/cpplinks / C++ Standard / C++20 / Coroutines
(draft; work in progress)
#coroutines (C++ Slack): https://cpplang.slack.com/archives/C5JS5JXT5
https://github.com/MattPD/cpplinks / C++ Standard / C++20 / Coroutines
(draft; work in progress)
#coroutines (C++ Slack): https://cpplang.slack.com/archives/C5JS5JXT5
| import math | |
| import click | |
| def emphasize(word: str, strength: float) -> tuple[str, float]: | |
| """ | |
| The weight of AI focus will be multiplied by 1.05 if you enclose the tags or | |
| text you want the AI to focus on more with { and } | |
| e.g. |
| import serial | |
| with serial.Serial("/dev/ttyUSB0", 9600, timeout=0.05) as ser: | |
| buf = [0xc0, 0x00, 0x08, | |
| 0x03, 0xea, 0x84, 0x00, 0x0f, 0x03, 0x00, 0x00] | |
| ser.write(bytes(buf)) | |
| r = ser.read(11) | |
| print(r) | |
| buf = [0xc1, 0x00, 0x08] | |
| ser.write(bytes(buf)) |
| import Flow | |
| -- could replace following Just to pure (keep the first one?) | |
| -- infix bind, boring! | |
| -- https://www.youtube.com/watch?v=ZhuHCtR3xq8 | |
| -- \a -> f a >>= \a -> g a | |
| -- where f :: a -> M b | |
| -- g :: b -> M c | |
| -- when the type a = b = c | |
| -- it could be seem as Monoid? |
| #include <iostream> | |
| #include <string> | |
| namespace utils { | |
| size_t sprintHex(char *out, size_t outSize, const uint8_t *bytes, size_t size) { | |
| size_t i = 0; | |
| // 2 hex chars + 1 null terminator | |
| if (outSize < (size * 2 + 1)) { | |
| return 0; | |
| } |
| #Mod_Priority,#Mod_Status,#Mod_Name | |
| "0001","+","Creation Club: ccvsvsse004-beafarmer" | |
| "0002","+","Creation Club: ccvsvsse003-necroarts" | |
| "0003","+","Creation Club: ccvsvsse002-pets" | |
| "0004","+","Creation Club: ccvsvsse001-winter" | |
| "0005","+","Creation Club: cctwbsse001-puzzledungeon" | |
| "0006","+","Creation Club: ccrmssse001-necrohouse" | |
| "0007","+","Creation Club: ccqdrsse002-firewood" | |
| "0008","+","Creation Club: ccpewsse002-armsofchaos" | |
| "0009","+","Creation Club: ccmtysse002-ve" |
| ### Commented entries have reasonable defaults. | |
| ### Uncomment to edit them. | |
| # Source: <source package name; defaults to package name> | |
| Section: misc | |
| Priority: optional | |
| # Homepage: <enter URL here; no default> | |
| Standards-Version: 1.0 | |
| Package: libdrm2-dummy | |
| # Version: <enter version here; defaults to 1.0> |
| # Update in 2023/06/19 | |
| # 1. frp no longer provide systemctl service file. This script creates frpc/fprs systemctl service file by itself | |
| # 2. Update frp from 0.33.0 to 0.49.0 | |
| # 3. User=nobody is no longer suggested, use DynamicUser=yes instead | |
| wget https://github.com/fatedier/frp/releases/download/v0.49.0/frp_0.49.0_linux_amd64.tar.gz --directory-prefix=/tmp | |
| DIR=frp_0.49.0_linux_amd64 | |
| tar -zxvf /tmp/$DIR.tar.gz -C /tmp |
| #include <cstddef> | |
| #include <cstdint> | |
| #include<format> | |
| #include<chrono> | |
| #include<concepts> | |
| #include <ratio> | |
| #include <type_traits> | |
| #include<utility> | |
| #include<iostream> |