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
| #! /bin/Bash | |
| pngfile=".png" | |
| jpgfile=".jpg" | |
| ignorefile='__ic' #ignore compress | |
| rootpath='src/assets' | |
| read_dir(){ | |
| for file in `ls -a $1` | |
| do |
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 pytesseract | |
| from pytesseract import * | |
| from PIL import Image,ImageEnhance,ImageFilter | |
| import os | |
| import fnmatch | |
| import re,time | |
| import urllib, random | |
| import time | |
| # or use imagehash lib |
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
| // | |
| // PendingLayout.h | |
| // Brightec | |
| // | |
| // Created by JOSE MARTINEZ on 03/09/2014. | |
| // Copyright (c) 2014 Brightec. All rights reserved. | |
| // | |
| #import <UIKit/UIKit.h> |
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
| // | |
| // ViewController.swift | |
| // ObjectMappingDemo | |
| // | |
| // Created by wuyongrui on 2016/11/13. | |
| // Copyright © 2016年 wuyr. All rights reserved. | |
| // | |
| import UIKit |
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
| // | |
| // OpenGLView.m | |
| #import "OpenGLView.h" | |
| #import <OpenGLES/ES2/gl.h> | |
| #import <OpenGLES/ES2/glext.h> | |
| #import <QuartzCore/QuartzCore.h> | |
| #import "Utils+OpenGL.h" |
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
| // https://osxentwicklerforum.de/index.php/Thread/24626-AVFoundation-CALayer/ | |
| -(void)renderSepiaEffectIntoAsset:(AVAsset*)asset withOnCompletion:(void(^)(NSURL* fileURL))aBlock{ | |
| CALayer* sepiaLayer = [CALayer layer]; | |
| sepiaLayer.frame = CGRectMake(20, 20, 320,480); | |
| CIFilter *myFilter = [CIFilter filterWithName:@"CISepiaTone"]; | |
| [myFilter setDefaults]; | |
| [myFilter setValue:[NSNumber numberWithFloat:0.8f] forKey:@"inputIntensity"]; | |
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
| # run server: $ sudo python server.py. sudo is neccessary | |
| from twisted.internet import reactor | |
| from twisted.internet.protocol import Factory, Protocol | |
| class IphoneChat(Protocol): | |
| def connectionMade(self): | |
| self.factory.clients.append(self) | |
| print "a client connected,clients are:",self.factory.clients |
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
| // | |
| // UIView+FrameAdjust.swift | |
| // | |
| import Foundation | |
| import UIKit | |
| public extension UIView { | |
| // use left |
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
| public extension UIViewController { | |
| public func setTabbarItem(title title:String,imageName:String!,selectedImageName:String!) { | |
| self.tabBarItem.title = title | |
| if imageName != nil { | |
| self.tabBarItem.image = UIImage(named:imageName) | |
| } | |
| if selectedImageName != nil { | |
| // self.tabBarItem.selectedImage = UIImage(named:selectedImageName) |
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 UIKit; | |
| @interface AAPLCameraViewController : UIViewController | |
| @end |
NewerOlder