Skip to content

Instantly share code, notes, and snippets.

View nashsu's full-sized avatar

nash_su nashsu

  • www.IterCast.com
  • Beijing
View GitHub Profile
@nashsu
nashsu / tracker-reshape.py
Created December 16, 2017 11:09 — forked from ohad7/tracker-reshape.py
Convert Keras h5 model to CoreML (reshape input layer)
from keras.models import load_model
from keras.layers import Input, Dense
from tensorflow import Tensor
from keras import backend as K
from keras.engine import InputLayer
model = load_model('MyModel.h5')
for layer in model.layers:
print layer
@nashsu
nashsu / gist:8dbc8063933b2d16434bfaae6eb450dd
Created November 12, 2017 07:28 — forked from glaurent/gist:aad82c4185f3c92f21dc
adding a video in a SceneKit scene using a SpriteKit SKVideoNode
let spriteKitScene = SKScene(size: CGSize(width: 1276.0 / 2.0, height: 712.0 / 2.0))
var videoSpriteKitNode:SKVideoNode?
let videoNode = SCNNode()
videoNode.geometry = SCNPlane(width: videoNodeWidth, height: videoNodeHeight)
// using SpriteKit scene with videonode inside
//
spriteKitScene.scaleMode = .AspectFit
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/*
* libMobileGestalt header.
* Mobile gestalt functions as a QA system. You ask it a question, and it gives you the answer! :)
*
* Copyright (c) 2013-2014 Cykey (David Murray)
* All rights reserved.
*/
#ifndef LIBMOBILEGESTALT_H_
#define LIBMOBILEGESTALT_H_
@nashsu
nashsu / pathfinder.js
Last active August 29, 2015 14:20 — forked from colllin/pathfinder.js
jQuery(function($) {
// returns an array of the potential selector components for the first element in the jQuery object. IDs, classes, and tagNames only.
var getSelectorComponents = function($el) {
var components = [];
var id = $el.attr('id');
if (typeof(id)!='undefined' && /[^\s]/.test(id)) {
components.push('#'+id);
}