Skip to content

Instantly share code, notes, and snippets.

View fujiyuu75's full-sized avatar

fujiyuu75 fujiyuu75

View GitHub Profile
@fujiyuu75
fujiyuu75 / 0_reuse_code.js
Created June 26, 2017 15:02
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
from sklearn.feature_extraction.text import CountVectorizer
vectorizer = CountVectorizer()
corpus = [
'Steve Jobs biological father, Abdulfattah John Jandali.',
'was born into an Arab Muslim household.',
'Jobs moved back to the San Francisco Bay Area.',
]
import tensorflow as tf
import numpy as np
x = tf.placeholder(tf.float32, [1, None])
y = tf.placeholder(tf.float32, [1, None])
dot = tf.matmul(x, y, transpose_b=True)
x_abs = tf.sqrt(tf.matmul(x, x, transpose_b=True))
y_abs = tf.sqrt(tf.matmul(y, y, transpose_b=True))
import tensorflow as tf
x = tf.constant(1, name="x")
y = tf.placeholder(tf.int32, name="y")
sum = tf.add(x, y)
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
print(sess.run(sum, feed_dict={y:2}))
import tensorflow as tf
var = tf.Variable(0, name="variable")
con = tf.constant(1)
sum = tf.add(var, con)
update = tf.assign(var, sum)
sess = tf.Session()
print(sess.run(State)) # 0
import tensorflow as tf
num1 = tf.constant(1)
num2 = tf.constant(2)
num3 = tf.constant(3)
sum = tf.add(num1, num2)
total = tf.add(sum,num3)
sess = tf.Session()
@fujiyuu75
fujiyuu75 / circleci_android_sdk_auto_sync.yml
Last active April 23, 2017 22:54
Auto download Android SDK in circleCI.
# SDK license is located at <$ANDROID_HOME/licenses/android-sdk-license> in local.
dependencies:
pre:
- mkdir $ANDROID_HOME/licenses
- echo <SDK license> >> $ANDROID_HOME/licenses/android-sdk-license
@fujiyuu75
fujiyuu75 / circleci_skip_test.yml
Last active April 23, 2017 22:55
Skip test of circleCI.
test:
override:
- echo "test"
@fujiyuu75
fujiyuu75 / gist:f1413241feb298996c0d6bfb11f8193b
Created April 22, 2017 18:32
circle.yml dependencies for build-tools-25.0.2
dependencies:
pre:
- echo y | android update sdk --no-ui --all --filter "platform-tools, tools"
- echo y | android update sdk --no-ui --all --filter "android-24, build-tools-25.0.2"
- echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
- echo y | android update sdk --no-ui --all --filter "extra-android-support"