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 java.util.Objects; | |
public class PlaceSanctuaries { | |
public static void main(String[] args) { | |
// 0 means this tile cannot be either a sanctuary or a forest (outside borders, water, mountains, cities, already built on, etc) | |
// n means this can be either city n's sanctuary, or a forest | |
Grid grid = new Grid(new int[][]{ | |
{0, 0, 1, 0, 2, 2, 2, 0}, | |
{0, 0, 1, 0, 0, 2, 2, 2}, |
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 10 columns, instead of 7 in line 5.
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
Timestamp,45716,45735,45826,45917,46008,46099,46190,46281,46372 | |
2025-02-26T17:25:00Z,0.027056356557038086,0.0241748257995944,0.021441814408476034,0.019664388192346394,0.018662151034920527,0.018304600806215987,0.018406030785191874,0.018668230765959137,0.018977560047668263 | |
2025-02-26T17:26:00Z,0.02705635655701144,0.024174955904641138,0.021442529868567206,0.019663089467618633,0.01867840214393901,0.018295318799692595,0.018402922897644558,0.018672900702476625,0.018968091060713732 | |
2025-02-26T17:27:00Z,0.027056356557038086,0.024174793462981015,0.021441653603027078,0.019666746995898876,0.01867370679510927,0.01829555371026359,0.01840506310797352,0.01865602340092032,0.018989762210868122 | |
2025-02-26T17:28:00Z,0.02705635655701144,0.024174793462981015,0.021441653603027078,0.01966673275616948,0.018673869786249853,0.018295556218976827,0.018404840801000688,0.018669954397996236,0.01897893102547954 | |
2025-02-26T17:29:00Z,0.02705635655701144,0.024175116925357898,0.021458951973762908,0.019653697179711216,0.018681593315585943,0.0183 |
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
model: HP Z6 G4 Workstation SBKPF,DWKSBLF | |
cpu: Intel Xeon Gold 5218 (64) @ 3.900GHz | |
memory: 46497MiB / 128597MiB | |
distro: Ubuntu Cinnamon 22.04.5 LTS x86_64 | |
kernel: 6.8.0-40-generic | |
openjdk 21.0.4 2024-07-16 LTS | |
OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS) | |
OpenJDK 64-Bit Server VM Temurin-21.0.4+7 (build 21.0.4+7-LTS, mixed mode, sharing) |
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
# throughout, the versions of dnf packages are not at all controlled :( | |
# install asdf | |
dnf install curl-minimal git | |
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0 | |
. "$HOME/.asdf/asdf.sh" | |
. "$HOME/.asdf/completions/asdf.bash" | |
# install asdf-python | |
asdf plugin-add python |
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 java.time.LocalDate; | |
import java.time.LocalDateTime; | |
import java.time.format.DateTimeFormatter; | |
import java.time.format.DateTimeFormatterBuilder; | |
import java.time.format.TextStyle; | |
import java.time.temporal.ChronoField; | |
import java.util.HashMap; | |
import java.util.Locale; | |
import java.util.Map; |
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 org.junit.jupiter.api.Test; | |
import java.util.List; | |
import java.util.function.Function; | |
import java.util.function.Predicate; | |
import java.util.stream.Collector; | |
import java.util.stream.Collectors; | |
import java.util.stream.Stream; | |
import static org.hamcrest.MatcherAssert.assertThat; |
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 <ql/config.hpp> | |
#include <cmath> | |
#include <iostream> | |
#include <ql/settings.hpp> | |
#include <ql/termstructures/yield/overnightindexfutureratehelper.hpp> | |
#include <ql/time/date.hpp> | |
#include <ql/time/frequency.hpp> |
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 java.util.Arrays; | |
import java.util.Random; | |
public class CalculateStandardArray { | |
private static final Random RANDOM = new Random(); | |
public static void main(String[] args) { | |
int numStats = 12; | |
int numTrials = 10_000_000; |
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
class ostream_state { | |
std::ostream::fmtflags flags; | |
std::streamsize precision = 6; | |
public: | |
class Save { | |
friend ostream_state; | |
friend std::ostream& operator<<(std::ostream& out, const Save& save) { | |
save.save(out); |
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
<html> | |
<head> | |
<style> | |
.tabs { | |
/* make this a horizontal flexbox, and make it capable of wrapping */ | |
display: flex; | |
flex-wrap: wrap; | |
} |
NewerOlder