Skip to content

Instantly share code, notes, and snippets.

View TadaTeruki's full-sized avatar
💭
Absentminded

Teruki TADA TadaTeruki

💭
Absentminded
  • Future University Hakodate / Eukarya Inc.
  • Hakodate, Japan
View GitHub Profile
@TadaTeruki
TadaTeruki / terrain.rs
Last active January 22, 2024 14:22
A sample terrain generated with fastlem
use fastlem::core::{parameters::TopographicalParameters, traits::Model};
use fastlem::lem::generator::TerrainGenerator;
use fastlem::models::surface::{builder::TerrainModel2DBulider, sites::Site2D};
use noise::{NoiseFn, Perlin};
use terrain_graph::edge_attributed_undirected::EdgeAttributedUndirectedGraph;
extern crate fastlem;
fn main() {
// The bound_min and bound_max are the minimum and maximum coordinates of the terrain.
import numpy as np
from scipy.stats import norm
import matplotlib.pyplot as plt
if __name__ == '__main__':
data = np.loadtxt("/root/opt/result.csv", #計測データのパスを指定する(これは各自の保存場所に変更)
delimiter = ",", #計測データ内の区切り文字はカンマ
@TadaTeruki
TadaTeruki / converter.go
Last active October 3, 2023 16:02
Converting Timestamp to CSV
/*
This program calculates the lap times from timestamps recorded by https://expect.sourceforge.net/stopwatch/ and convert the result into csv file.
Example: reading "test.txt"
```test.txt
T 000:03:52.729
T 000:03:50.759
T 000:03:48.599
T 000:03:46.596
[out:json][timeout:600];
// gather results
area["name"="日本"]->.japan;
(
// query part for: “amenity=fast_food”
node["amenity"="fast_food"]({{bbox}});
way["amenity"="fast_food"]({{bbox}});
relation["amenity"="fast_food"]({{bbox}});
// query part for: “amenity=pharmacy”
@TadaTeruki
TadaTeruki / AkimaSpline.go
Last active December 14, 2021 10:16
Implementation of akima spline in golang
/*
MIT License
Copyright (c) 2021 Tada Teruki<tadateruki.public@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@TadaTeruki
TadaTeruki / PriorityQueue.go
Last active December 14, 2021 10:16
Priority-queue implementation in go
/*
MIT License
Copyright (c) 2021 Tada Teruki<tadateruki.public@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is