My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
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
#!/usr/bin/env bash | |
# Author: Sasha Nikiforov | |
# source of inspiration | |
# https://stackoverflow.com/questions/41293077/how-to-compile-tensorflow-with-sse4-2-and-avx-instructions | |
# Detect platform | |
if [ "$(uname)" == "Darwin" ]; then | |
# MacOS |
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
# Mostly copied from https://keras.io/applications/#usage-examples-for-image-classification-models | |
# Changing it to use InceptionV3 instead of ResNet50 | |
from keras.applications.inception_v3 import InceptionV3, preprocess_input, decode_predictions | |
from keras.preprocessing import image | |
import numpy as np | |
model = InceptionV3() | |
img_path = 'elephant.jpg' |
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 Foundation | |
var str = """ | |
This is some text that needs to be processed. I do not know how fast this runs? | |
日本, | |
Лорем ипсум долор сит амет, перпетуа урбанитас ин про, проприае цонсететур ид сит | |
""" | |
let tagger=NSLinguisticTagger(tagSchemes: [.lemma, .language, .lexicalClass], options:0 ) | |
tagger.string=str |
Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.
- [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
[UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached[UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead[UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
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
# docker build -t ubuntu1604py36 | |
FROM ubuntu:16.04 | |
RUN apt-get update && \ | |
apt-get install -y software-properties-common && \ | |
add-apt-repository ppa:jonathonf/python-3.6 | |
RUN apt-get update | |
RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv | |
RUN apt-get install -y git |
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
version: '2' | |
services: | |
gitlab: | |
container_name: gitlab | |
image: gitlab/gitlab-ce:latest | |
restart: always | |
environment: | |
GITLAB_OMNIBUS_CONFIG: | | |
## GitLab configuration settings | |
##! Check out the latest version of this file to know about the different |