theta | r | |
---|---|---|
0 | 3.4483 | 1.17782 |
1 | 4.49367 | 0.770008 |
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
class _aabb: | |
def __init__(self, _from, _to): | |
self._from = tuple(map(min, zip(_from, _to))) | |
self._to = tuple(map(max, zip(_from, _to))) | |
def __iter__(self): | |
return iter((*self._from, *self._to)) | |
@property | |
def width(self): |
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 fiona | |
import matplotlib.cm as cm | |
import pandas as pd | |
from matplotlib.colors import to_hex | |
from staticmap import Polygon, StaticMap | |
# src: https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-N03-v3_1.html | |
c = fiona.open("N03-20220101_17_GML/N03-22_17_220101.shp", "r") | |
df = pd.DataFrame(c) |
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 pandas as pd | |
import matplotlib.pyplot as plt | |
from matplotlib.colors import Normalize, to_hex | |
import folium | |
from folium import FeatureGroup, LayerControl | |
from folium.plugins import Search | |
# python3 -m pip uninstall gistools -y |
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 pandas as pd | |
import numpy as np | |
from itertools import product | |
import folium | |
from folium import FeatureGroup, LayerControl | |
from folium.plugins import Search | |
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 itertools | |
from functools import lru_cache | |
from PIL import Image, ImageDraw | |
from staticmap import CircleMarker | |
from staticmap import StaticMap as _StaticMap | |
from staticmap.staticmap import _lat_to_y, _lon_to_x | |
class Mesh: |
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
@dataclass | |
class Maze: | |
width = 12 | |
height = 8 | |
def maze_renderer(m: Maze, conf: GameConf): | |
px_size = min(conf.window_width//m.width, conf.window_height//m.height) | |
suf = pygame.Surface((px_size*m.width, px_size*m.height)) | |
for x in range(0, px_size*m.width, px_size): |
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
# ispired by: https://www.youtube.com/watch?v=n-tLlBNgS3g | |
import random | |
import sys | |
from contextlib import contextmanager | |
import pygame | |
Vec2 = pygame.math.Vector2 | |
FPS = 60 |
NewerOlder