This file contains hidden or 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 amazonlinux:2017.03 | |
RUN yum -y install git \ | |
python36 \ | |
python36-pip \ | |
python36-devel \ | |
zip \ | |
gcc \ | |
gcc-c++ \ | |
cmake \ |
This file contains hidden or 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 glob import glob | |
import multiprocessing | |
from concurrent.futures import ProcessPoolExecutor | |
import cv2 | |
from PIL import Image | |
import imagehash | |
from tqdm import tqdm |
This file contains hidden or 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
pip install grpcio-tools | |
wget https://github.com/tensorflow/tensorflow/archive/v1.9.0.zip -O tf-190.zip | |
unzip tf-190.zip && rm tf-190.zip | |
wget https://github.com/tensorflow/serving/archive/1.9.0.zip -O tf-serving-190.zip | |
unzip tf-serving-190.zip && rm tf-serving-190.zip | |
mv serving-1.9.0/tensorflow_serving tensorflow-1.9.0 |
This file contains hidden or 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 time | |
import threading | |
from io import StringIO | |
from multiprocessing import Process | |
from queue import Queue | |
import boto3 | |
from botocore.exceptions import ClientError |
This file contains hidden or 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 time | |
from io import StringIO | |
import subprocess | |
from multiprocessing import Process, Pipe | |
from threading import Thread | |
This file contains hidden or 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 avro; | |
import org.apache.avro.Schema; | |
import org.apache.avro.generic.GenericData; | |
import org.apache.avro.generic.GenericRecord; | |
import org.apache.avro.reflect.ReflectData; | |
import java.util.ArrayList; | |
import java.util.List; |
This file contains hidden or 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 heapq | |
import numpy as np | |
from sklearn.cluster import KMeans, MiniBatchKMeans | |
def sklearn_bisecting_kmeans_lineage(X, k, verbose=0): | |
N, _ = X.shape | |
labels = np.zeros(N, dtype=np.int) | |
lineage = np.zeros((k, N), dtype=np.int) |
This file contains hidden or 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 java.io.Serializable; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import com.google.common.collect.HashMultiset; | |
import com.google.common.collect.Multiset; | |
import com.google.common.collect.Multiset.Entry; | |
import com.google.common.collect.Multisets; |
This file contains hidden or 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 requests | |
import base64 | |
from tqdm import tqdm | |
master_json_url = 'https://178skyfiregce-a.akamaihd.net/exp=1474107106~acl=%2F142089577%2F%2A~hmac=0d9becc441fc5385462d53bf59cf019c0184690862f49b414e9a2f1c5bafbe0d/142089577/video/426274424,426274425,426274423,426274422/master.json?base64_init=1' | |
base_url = master_json_url[:master_json_url.rfind('/', 0, -26) + 1] | |
resp = requests.get(master_json_url) | |
content = resp.json() |
This file contains hidden or 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
strict digraph G { | |
nodesep=1; | |
center=true; margin=1; | |
splines=true; | |
sep=1; | |
node [height="0.33", width="0.33", fixedsize=true]; | |
edge [len=1.5]; | |
v1 -> v130 | |
v1 -> v131 |