Skip to content

Instantly share code, notes, and snippets.

View josuemtzmo's full-sized avatar
🎯
Focusing

Josué Martínez Moreno josuemtzmo

🎯
Focusing
View GitHub Profile
@josuemtzmo
josuemtzmo / regional_box_in_map.py
Created December 18, 2019 00:27
Code to generate regional boxes in maps with Basemap. It can be implemented in carroty by replacing the map function with the corresponding one.
# Pacific,Indian, Atlantic
# Values correspond to the corners of the box.
x_areas=[[150,150,288,288],[40,40,150,150],[325-360,325-360,10,10]]
y_areas=[[-48,-62,-62,-48],[-44,-57,-57,-44],[-46,-56,-56,-46]]
for a_ind in range(len(x_areas)):
#Initial position of box
A_x=[x_areas[a_ind][0]]
A_y=[y_areas[a_ind][0]]
#Append each degree a new point in the x and y direction.
@josuemtzmo
josuemtzmo / par_dask_griddata.py
Created March 7, 2020 00:35 — forked from wgurecky/par_dask_griddata.py
Parallel scipy griddata with Dask
#!/usr/bin/python3
#!/usr/bin/env python
#-*- coding: utf-8 -*-
#==============================================================================
# Copyright (c) 2018, William Gurecky
# All rights reserved.
#
# DESCRIPTION:
# Inspired from stack overflow question:
# https://stackoverflow.com/questions/52227599/interpolate-griddata-uses-only-one-core
@josuemtzmo
josuemtzmo / move_xquartz_w.sh
Created December 9, 2021 09:30
Function to shifts all windows within xQuartz to a given location.
#!/bin/bash
# This function shifts all windows within xQuartz to a given location.
# Its required to `brew install xdotool`
# The arguments of this function correspond to:
# $1 [string] == Name of window to shift
# $2 [int] == X coordinate in screen space (pixels, for example 800)
# $3 [int] == Y coordinate in screen space (pixels, for example 1000)
# Usage example:
# move_xquartz_windows Ncview 800 1000
@josuemtzmo
josuemtzmo / unmanaged_memory_test.ipynb
Created April 28, 2022 14:16
Notebook to test unmanaged memory issue
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.