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
from sklearn import tree | |
features=[[140,1],[130,1],[150,0],[170,0]] | |
labels=[0,0,1,1] | |
clf=tree.DecisionTreeClassifier() | |
clf=clf.fit(features,labels) | |
print clf.predict([[150,0]]) |
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
from sklearn import tree |
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
#[[140g,Smooth],[130g,Smooth],[150g,Bumpy],[170g,Bumpy]] | |
features=[[140,1],[130,1],[150,0],[170,0]] | |
#[Apple,Apple,Orange,Orange] | |
labels=[0,0,1,1] |
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
clf=tree.DecisionTreeClassifier() | |
clf=clf.fit(features,labels) |
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 clf.predict([[150,0]]) |
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
task hello { | |
description "Hey MADMeetup! Don't say I like your presentation, love it :D" | |
group "Mumbai Android Developers" | |
doLast { | |
println description | |
println group | |
println "Hello World!" | |
} | |
} |
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
public class MainActivity extends AppCompatActivity { | |
private final int PERMISSION_REQUEST_CODE = 1; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
// list of permissions |
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
from __future__ import print_function | |
import tensorflow as tf | |
hello = tf.constant('Hello, TensorFlow!') #Creating the constant op | |
sess = tf.Session() # Start tf session | |
print(sess.run(hello)) # Run the op |
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
from __future__ import print_function | |
import tensorflow as tf | |
hello = tf.constant('Hello, TensorFlow!') | |
# Start tf session | |
sess = tf.Session() | |
# Run the op | |
print(sess.run(hello)) |
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
from __future__ import print_function | |
import tensorflow as tf | |
# Basic constant operations | |
a = tf.constant(2) | |
b = tf.constant(4) | |
# Launch the default graph. | |
with tf.Session() as sess: | |
print("a=2, b=4") |
OlderNewer