import numpy as np
face_nodes = np.array([
[1, 2, 6, np.nan],
[1, 6, 5, np.nan],
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 itertools import product | |
import numpy as np | |
INV_SQRT_3 = 1.0 / np.sqrt(3.0) | |
ASIN_INV_SQRT_3 = np.arcsin(INV_SQRT_3) | |
def gaussian_bell(xs, ys, xc=0., yc=0., xsigma=1., ysigma=1.): | |
""" Compute a 2D Gaussian with asymmetric standard deviations and |
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
count mean std min 0.01% 0.1% 1% 5% 50% 95% max | |
Sphere_Sinusoidal 763.0 1.914681e+11 2.372329e+12 12710.243678 19863.381206 84241.618957 319912.537468 736928.604246 7.063695e+06 3.933282e+10 5.037316e+13 | |
World_Sinusoidal 763.0 1.916041e+11 2.374258e+12 12807.187297 19925.034360 83985.657924 321332.775607 734977.773185 7.105145e+06 3.955987e+10 5.047489e+13 | |
Sphere_Mollweide 763.0 1.910515e+11 2.370221e+12 11428.973514 18679.709621 83936.334582 321039.742256 730216.371168 7.080316e+06 3.922586e+10 5.037068e+13 | |
World_Mollweide 763.0 1.914797e+11 2.375534e+12 11454.594055 18721.584280 84124.496300 321759.423300 731853.311448 7.096188e+06 3.931379e+10 5.048360e+13 | |
Sphere_Eckert_VI 763.0 1.914801e+11 2.372390e+12 10075.406577 17429.301224 83614.353046 317443.145553 73206 |
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
from functools import reduce | |
from typing import Any | |
from typing import Dict | |
def merge(a, b, path=None): | |
""" Merge dictionary a into b (in-place)""" | |
# source: https://stackoverflow.com/a/7205107/592289 | |
if path is None: path = [] | |
for key in b: |
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 numpy as np | |
import pyproj | |
# Use the "new" numpy API for the random number generation (requires numpy >=1.17) | |
rng = np.random.default_rng(seed=1) | |
# Create arrays with random points | |
no_points = 5 | |
longitudes = rng.uniform(low=10, high=20, size=no_points) | |
latitudes = rng.uniform(low=33, high=45, size=no_points) |
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
$ sudo hcitool lescan | |
AA:BB:CC:DD:EE:FF Polar H10 ABCDEFGH | |
$ gatttool -t random --device=AA:BB:CC:DD:EE:FF --interactive | |
[AA:BB:CC:DD:EE:FF][LE]> connect | |
Attempting to connect to AA:BB:CC:DD:EE:FF | |
Connection successful | |
[AA:BB:CC:DD:EE:FF][LE]> primary | |
attr handle: 0x0001, end grp handle: 0x0009 uuid: 00001800-0000-1000-8000-00805f9b34fb | |
attr handle: 0x000a, end grp handle: 0x000d uuid: 00001801-0000-1000-8000-00805f9b34fb |
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
#!/usr/bin/env python3 | |
import datetime | |
import numpy as np | |
import tensorflow as tf | |
# Processing Units logs | |
log_device_placement = True |
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 hashlib | |
import sys | |
if len(sys.argv) != 3: | |
sys.exit("Usage: python3 verify.py hash passphrase") | |
provided_hash = sys.argv[1] | |
passphrase = sys.argv[2] | |
salt = provided_hash.split(":")[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 __future__ import print_function | |
''' | |
Basic Multi GPU computation example using TensorFlow library. | |
Author: Aymeric Damien | |
Project: https://github.com/aymericdamien/TensorFlow-Examples/ | |
''' | |
''' | |
This tutorial requires your machine to have 1 GPU | |
"/cpu:0": The CPU of your machine. |
NewerOlder