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
version: "3.2" | |
# run script | |
# docker swarm init | |
# docker stack deploy timeseries -c docker-compose.yml | |
services: | |
influxdb: | |
image: influxdb:latest | |
ports: | |
- 8086:8086 |
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
def triplet_loss(y_true, y_pred, alpha = 0.2): | |
""" | |
Implementation of the triplet loss function | |
Arguments: | |
y_true -- true labels, required when you define a loss in Keras, not used in this function. | |
y_pred -- python list containing three objects: | |
anchor: the encodings for the anchor data | |
positive: the encodings for the positive data (similar to anchor) | |
negative: the encodings for the negative data (different from anchor) |
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
/* compile with: | |
* gcc $(pkg-config xext x11 cairo-xlib-xrender --cflags --libs) cairo-xshape-example.c | |
* https://github.com/jordansissel/experiments/blob/master/randomcode/cairo-xshape-example.c | |
*/ | |
#include <cairo-xlib.h> | |
#include <X11/Xlib.h> | |
#include <X11/Xutil.h> | |
#include <stdio.h> | |
#include <X11/extensions/shape.h> |
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
#!/bin/bash | |
# install CUDA Toolkit v8.0 | |
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network)) | |
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb" | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG} | |
sudo dpkg -i ${CUDA_REPO_PKG} | |
sudo apt-get update | |
sudo apt-get -y install cuda |
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
#!/bin/sh | |
CTARGET="$1" | |
if [ -z "$CTARGET" ]; then | |
program=$(basename $0) | |
echo "usage: $program TARGET_ARCH" | |
return 1 | |
fi | |
# get abuild configurables |
Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:
Considerations to take when live streaming:
The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:
-
Set the buffer size (
-bufsize:v
) equal to the target bitrate (-b:v
). You want to ensure that you're encoding in CBR mode. -
Set up the encoders as shown:
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
package com.irinnovative.enablegps; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.content.IntentSender; | |
import android.os.Bundle; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import com.google.android.gms.common.api.GoogleApiClient; |
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
user rtmp; | |
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; |