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 pathlib | |
from itertools import product | |
from tqdm import tqdm | |
import rasterio | |
import geosoft | |
import geosoft.gxpy.gx as gx | |
import geosoft.gxpy.coordinate_system as gxcs | |
import geosoft.gxpy.grid as gxgrid |
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 sys | |
import numpy as np | |
import rasterio as rio | |
from rasterio.warp import reproject, Resampling | |
def make_same(src_path: str, like_path: str, out_path: str) -> None: | |
with rio.open(like_path) as ds: | |
like_arr = ds.read(1) |
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
from prefect import Flow, task | |
from loguru import logger | |
def fn1(): | |
print("Hello from fn1") | |
def fn2(): | |
logger.info("Hello from fn2") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
whoopsie-upload-all[1195]: /var/crash/_usr_bin_i3.1000.crash already marked for upload, skipping | |
systemd[1463]: Starting GNOME Session Manager (session: i3-gnome-flashback)... | |
systemd[1463]: Started GNOME Session Manager (session: i3-gnome-flashback). | |
systemd[1463]: Reached target GNOME Session (session: i3-gnome-flashback). | |
i3-gnome-flashback.desktop[2246]: method return time=1570699567.739931 sender=:1.31 -> destination=:1.50 serial=125 reply_serial=2 | |
i3-gnome-flashback.desktop[2246]: object path "/org/gnome/SessionManager/Client10" | |
i3-gnome-flashback.desktop[2246]: Usage: | |
i3-gnome-flashback.desktop[2246]: gsettings [--schemadir SCHEMADIR] get SCHEMA[:PATH] KEY | |
i3-gnome-flashback.desktop[2246]: Get the value of KEY | |
i3-gnome-flashback.desktop[2246]: Arguments: |
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
from math import pi, ceil | |
def get_num_service_transf(pop, peak_kw_pp=1): | |
grid_cell_area = 0.45 * 0.45 # km2 | |
num_people_per_hh = 4 | |
power_factor = 0.9 | |
lv_line_max_length = 0.5 # km | |
service_transf_type = 50 # kVa | |
max_nodes_per_serv_trans = 300 # maximum number of nodes served by each service transformer |
- Open your terminal and type the following and enter the password.
$ ssh <user>@<IP>
- There are several different processes running in different
tmux
sessions. I prepared two sessions calledg1
andg2
that we can use to run the algorithm in parallel. To connect to one of the sessions, type the below. There should now be an extra bar on the bottom of the terminal with the session name in it.
$ tmux attach -t
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
from math import sqrt | |
import numpy as np | |
from scipy import signal | |
import rasterio | |
# Code from https://github.com/carderne/gridfinder/blob/master/gridfinder/prepare.py | |
# And https://github.com/carderne/gridfinder/blob/master/gridfinder/_util.py | |
def filter_func(i, j): |