Skip to content

Instantly share code, notes, and snippets.

View kenmaz's full-sized avatar

kenmaz kenmaz

View GitHub Profile
[Desktop] git clone git@github.com:libffi/libffi.git
Cloning into 'libffi'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 12750 (delta 0), reused 1 (delta 0), pack-reused 12744
Receiving objects: 100% (12750/12750), 7.45 MiB | 2.96 MiB/s, done.
Resolving deltas: 100% (8024/8024), done.
[Desktop] cd libffi
EC2 Instance: p2.xlarge
AMI: Ubuntu 18.04 LTS - Bionic / official Ubuntu AMI
https://aws.amazon.com/marketplace/pp/B07CQ33QKV?ref=cns_srchrow
=====
ubuntu@ip-172-31-15-26:~$ sudo apt install python2.7
ubuntu@ip-172-31-15-26:~$ sudo python2.7 get-pip.py
ubuntu@ip-172-31-15-26:~$ sudo pip install virtualenv
ubuntu@ip-172-31-15-26:~$ virtualenv python2
@kenmaz
kenmaz / gist:8c2b9c3e1530167169c76caf67315fdf
Created December 21, 2017 17:53
turi-create coreml python error
[image_classification]$ python train.py
[02:49:49] src/nnvm/legacy_json_util.cc:190: Loading symbol saved by previous version v0.8.0. Attempting to upgrade...
[02:49:49] src/nnvm/legacy_json_util.cc:198: Symbol successfully upgraded!
Resizing images...
Performing feature extraction on resized images...
Completed 38/38
WARNING: The number of feature dimensions in this problem is very large in comparison with the number of examples. Unless an appropriate regularization value is set, this model may not provide accurate predictions for a validation/test set.
WARNING: Detected extremely low variance for feature(s) '__image_features__' because all entries are nearly the same.
Proceeding with model training using all features. If the model does not provide results of adequate quality, exclude the above mentioned feature(s) from the input dataset.
Logistic regression:
@kenmaz
kenmaz / gist:c452851070d89ff6dfd4b83a6ea5a9d6
Created December 21, 2017 17:53
turi-create coreml python error
Process: Python [64737]
Path: /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 2.7.13 (2.7.13)
Code Type: X86-64 (Native)
Parent Process: bash [63006]
Responsible: Python [64737]
User ID: 480524352
Date/Time: 2017-12-22 02:51:50.302 +0900
import Foundation
protocol JSONSerializable {
func serializable() -> AnyObject
}
extension JSONSerializable {
func serializable() -> AnyObject {
return self as AnyObject
}
# まとめblog
http://niwatako.hatenablog.jp/entry/2016/03/05/022452
===================================================================
# Swiftのエコシステムに飛び込む #tryswiftconf Day1-1
http://niwatako.hatenablog.jp/entry/2016/03/02/105937
★聞いてない奴
OSSになっていろいろ動きが
//: Playground - noun: a place where people can play
import Foundation
class Thunder { }
class Fire { }
//genericなprotocol
protocol Pokemon {
typealias PokemonType //swift2.2ではassociatedTypeって書くんだっけ
@kenmaz
kenmaz / file0.txt
Last active August 29, 2015 14:05
CoreDataでatomicにsaveする ref: http://qiita.com/kenmaz/items/89e50f94262a4d0547c5
User
-uid
-name
use Data::Dumper;
print Dumper $a;
----
xslate
[% $a | dump %]