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
// swift 3 | |
import UIKit | |
import AVFoundation | |
class VideoPreviewView: UIView { | |
private var videoOutput: AVCaptureMovieFileOutput? | |
private var captureSession: AVCaptureSession? | |
private var previewLayer: AVCaptureVideoPreviewLayer? | |
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
// MARK : Localization+IBInspectable.h | |
@interface UILabel(Localization) | |
@property (nonatomic, weak) IBInspectable NSString *localizationId; | |
@end | |
@interface UIButton(Localization) | |
@property (nonatomic, weak) IBInspectable NSString *localizationId; | |
@end |
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 os, argparse | |
import tensorflow as tf | |
from tensorflow.python.tools import freeze_graph as freeze_tool | |
def freeze_graph(sess, input_checkpoint_path): | |
saver = tf.train.Saver() # or your own Saver | |
saver.restore(sess, input_checkpoint_path) | |
absolute_model_dir = 'absolute_model_dir1111' | |
graph_file_name = 'tf-model_graph' |
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
print('Usage (where PATH is .xlsx file): python import_localization.py <PATH> <LANG_COLUMN_NAME>') | |
# python import_localization.py spreadsheet-3.xlsx "Eng Value" | |
try: | |
import pandas as pd | |
except: | |
print('Install pandas!!!!') | |
print('Try: pip install pandas') | |
raise |
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 RxSwift | |
class RxAutosuggest<Model> { | |
//MARK: Types | |
typealias QueryCache = (items: [Model], query: String) | |
typealias Sort<T> = (T, T)->Bool | |
typealias SortGenerator = (_ query: String)->Sort<Model> |
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
// | |
// DragDropImageView.h | |
// TFVideo | |
// | |
// Created by user on 2/1/18. | |
// Copyright © 2018 AlexO. All rights reserved. | |
// | |
#import <AppKit/AppKit.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
import Foundation | |
class A : DInjectEntity { } | |
class B : DInjectEntity { | |
var a:A! | |
} | |
class C : DInjectEntity { } | |
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 UIKit | |
private var _UITextField_maxTextLength = "_UITextField_maxTextLength" | |
extension UITextField { | |
@IBInspectable | |
var maxTextLength:Int { | |
get { | |
return objc_getAssociatedObject(self, |
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
#include <tensorflow/core/framework/op.h> | |
#include <tensorflow/core/framework/op_kernel.h> | |
#include <tensorflow/core/framework/shape_inference.h> | |
using namespace tensorflow; | |
using namespace register_kernel; | |
struct KernelRegistration { | |
KernelRegistration(const KernelDef& d, StringPiece c, |
OlderNewer