Author: Sean Gillies Version: 1.0
This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.
NUMBER_BUCKETS = 600 | |
def hash_bucket(data, num_buckets=NUMBER_BUCKETS, seed=42): | |
"""MurmurHash3 was written by Austin Appleby, and is placed in the | |
public domain. The author hereby disclaims copyright to this source | |
code.""" | |
c1 = 0xcc9e2d51 | |
c2 = 0x1b873593 |
import json | |
import geojson | |
from shapely.geometry import shape | |
o = { | |
"coordinates": [[[23.314208, 37.768469], [24.039306, 37.768469], [24.039306, 38.214372], [23.314208, 38.214372], [23.314208, 37.768469]]], | |
"type": "Polygon" | |
} | |
s = json.dumps(o) |
def hash_bucket(data, num_buckets=NUMBER_BUCKETS, seed=42): | |
"""MurmurHash3 was written by Austin Appleby, and is placed in the | |
public domain. The author hereby disclaims copyright to this source | |
code.""" | |
c1 = 0xcc9e2d51 | |
c2 = 0x1b873593 | |
length = len(data) | |
h1 = seed |
This guide will show you how to use Intel graphics for rendering display and NVIDIA graphics for CUDA computing on Ubuntu 18.04 desktop.
I made this work on an ordinary gaming PC with two graphics devices, an Intel UHD Graphics 630 plus an NVIDIA GeForce GTX 1080 Ti.
Both of them can be shown via lspci | grep VGA
.
00:02.0 VGA compatible controller: Intel Corporation Device 3e92
01:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
The official instructions on installing TensorFlow are here: https://www.tensorflow.org/install. If you want to install TensorFlow just using pip, you are running a supported Ubuntu LTS distribution, and you're happy to install the respective tested CUDA versions (which often are outdated), by all means go ahead. A good alternative may be to run a Docker image.
I am usually unhappy with installing what in effect are pre-built binaries. These binaries are often not compatible with the Ubuntu version I am running, the CUDA version that I have installed, and so on. Furthermore, they may be slower than binaries optimized for the target architecture, since certain instructions are not being used (e.g. AVX2, FMA).
So installing TensorFlow from source becomes a necessity. The official instructions on building TensorFlow from source are here: ht
sudo dpkg --force-depends --purge libpython3.9-minimal
Or
sudo dpkg --remove --force-depends python3.6 python3.6-minimal libpython3.6-minimal libpython3.6-stdlib
This should be one of the core features of Git, but for some reason it's impossible to figure out how to search for a string in your commit history and see the diffs that that string is in. Here's the best I've come up with:
To find which commits and which files a string was added or removed in:
git log -S'search string' --oneline --name-status
To see the diff of that
def percentile(n): | |
def percentile_(x): | |
return np.percentile(x, n) | |
percentile_.__name__ = 'percentile_%s' % n | |
return percentile_ | |
df.groupby(['id'])[cols].agg(['min', 'max', np.mean, np.std, np.median, percentile(50), percentile(95)]) |
brew install ffmpeg | |
ffmpeg -i /path/to/input/file /path/to/output.mp4 |