Discover gists
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
Log uploaded on Friday, February 7, 2025, 11:33:21 PM | |
Loaded mods: | |
Harmony(brrainz.harmony)[mv:2.3.1.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1) | |
Core(Ludeon.RimWorld): (no assemblies) | |
HugsLib(UnlimitedHugs.HugsLib)[ov:11.0.4]: 0Harmony(av:2.3.3,fv:1.2.0.1), HugsLib(av:1.0.0,fv:11.0.4) | |
Fences And No Floors(drzhivago.fencesandnofloors): (no assemblies) | |
More Trade Ships(PinoChemicali.MoreTradeShips): (no assemblies) | |
Removable Mt.Rock Roof Patch(Proxyer.RemovableMtRockRoofPatche): (no assemblies) | |
Wall Light(Murmur.WallLight): WallLight(av:1.5.8874.26767,fv:1.0.0) | |
Tilled Soil(GT.Sam.TilledSoil): (no assemblies) |
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 { type Receive, type Send, useMailbox } from "./mailbox.ts"; | |
export type Context<Msg> = { | |
self: string; | |
send: (id: string, msg: Msg) => Promise<void>; | |
receive: Receive<Msg>; | |
spawn: (id: string, actor: Actor<Msg>) => string; | |
}; | |
export type Actor<Msg> = (context: Context<Msg>) => Promise<void>; |
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
# This goes after the call to LetsPlot.setup_html(), | |
# but before calling ggplot(). | |
def setup_colab2pdf(): | |
def _repr_svg_(self): | |
from io import BytesIO | |
from sys import stdout | |
file_like = BytesIO() | |
self.to_svg(file_like) | |
return file_like.getvalue().decode(stdout.encoding) |
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
id | station | stationid | value | unit | obstime | date | |
---|---|---|---|---|---|---|---|
0 | 流浮山 | RF001 | 0 | mm | 2025-02-08T06:15:00+08:00 | 2025-02-08 | |
1 | 湿地公园 | RF002 | 0 | mm | 2025-02-08T06:15:00+08:00 | 2025-02-08 | |
2 | 水边围 | N12 | 0 | mm | 2025-02-08T06:15:00+08:00 | 2025-02-08 | |
3 | 石岗 | RF003 | 0 | mm | 2025-02-08T06:15:00+08:00 | 2025-02-08 | |
4 | 大美督 | RF004 | 0 | mm | 2025-02-08T06:15:00+08:00 | 2025-02-08 | |
5 | 大埔墟 | RF005 | 0 | mm | 2025-02-08T06:15:00+08:00 | 2025-02-08 | |
6 | 北潭涌 | RF006 | 0 | mm | 2025-02-08T06:15:00+08:00 | 2025-02-08 | |
7 | 滘西洲 | RF007 | 0 | mm | 2025-02-08T06:15:00+08:00 | 2025-02-08 | |
8 | 西贡 | N15 | 0 | mm | 2025-02-08T06:15:00+08:00 | 2025-02-08 |
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
""" | |
Problem: | |
Given an immutable tree (where each node is identified by a unique ID and contains a list of children), | |
write a function to process queries that ask for the n-th parent (iteratively climbing upwards) of a node. | |
Preprocessing is allowed (in below code, all lines that are used to populating cache are considered as preprocessing), | |
want fastest average query time, allow some space complexity. | |
Time complexity: O(log(n)) | |
Space complexity: O(n*log(n)) | |
""" |
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
Log uploaded on Friday, February 7, 2025, 3:29:36 PM | |
Loaded mods: | |
Prepatcher(zetrith.prepatcher): 0Harmony(2.3.3), 0PrepatcherAPI(1.2.0), 0PrepatcherDataAssembly(1.0.0), PrepatcherImpl(1.0.0), Prestarter(1.0.0) | |
Harmony(brrainz.harmony)[mv:2.3.1.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1) | |
Fishery - Modding Library(bs.fishery): 0PrepatcherAPI(1.2.0), 1Fishery(0.6.0), System.Runtime.CompilerServices.Unsafe(av:6.0.0,fv:6.0.21.52210) | |
Core(Ludeon.RimWorld): (no assemblies) | |
Performance Fish(bs.performance): PerformanceFish(0.6.0) | |
Royalty(Ludeon.RimWorld.Royalty): (no assemblies) | |
Ideology(Ludeon.RimWorld.Ideology): (no assemblies) | |
Biotech(Ludeon.RimWorld.Biotech): (no assemblies) |
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
Console.WriteLine("Сколько у вас золото?...."); | |
int quantityGold = Convert.ToInt32(Console.ReadLine()); | |
const float crystalPerGold = 0.69F; | |
Console.WriteLine($"На сколько Кристал желайте поменить?\n стоимость золота: {crystalPerGold} Кристал"); | |
int quantityCristal = Convert.ToInt32(Console.ReadLine()); | |
float restGold = quantityGold - (quantityCristal/crystalPerGold); | |
Console.WriteLine($"Вы получите {quantityCristal} и остается {restGold}k "); |
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
name: expert | |
channels: | |
- conda-forge | |
- defaults | |
dependencies: | |
- _libgcc_mutex=0.1=conda_forge | |
- _openmp_mutex=4.5=2_gnu | |
- _r-mutex=1.0.0=anacondar_1 | |
- _sysroot_linux-64_curr_repodata_hack=3=haa98f57_10 | |
- atk-1.0=2.36.0=ha1a6a79_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
Script started on 2025-02-07 21:46:11+00:00 [COMMAND="/home/ludovic/nuttx-release/run-job.sh risc-v-03" <not executed on terminal>] | |
Now running https://github.com/lupyuen/nuttx-release/blob/main/run-job.sh | |
Called by https://github.com/lupyuen/nuttx-release/blob/main/run-ci.sh | |
+ job=risc-v-03 | |
+ neofetch | |
.-/+oossssoo+/-. | |
`:+ssssssssssssssssss+:` | |
-+ssssssssssssssssssyyssss+- | |
.ossssssssssssssssssdMMMNysssso. | |
/ssssssssssshdmmNNmmyNMMMMhssssss/ |
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
# train_grpo.py | |
import re | |
import torch | |
from datasets import load_dataset, Dataset | |
from transformers import AutoTokenizer, AutoModelForCausalLM | |
from peft import LoraConfig | |
from trl import GRPOConfig, GRPOTrainer | |
# Load and prep dataset |