Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Mahmood Hussain Bhat Mahmood-Hussain

🎯
Focusing
View GitHub Profile
View Indian State names Java Array
String indianStates[] = new String[] {"Andaman and Nicobar", "Arunachal Pradesh", "Assam", "Bihar", "Chattisgarh", "Chandigarh", "Dadra and Nagar Haveli", "Daman and Diu", "Goa", "Gujrat", "Haryana", "Himachal Pradesh", "Jammu and Kashmir", "Jharkhand", "Karnataka", "Kerala", "Lakshadweep", "Madya Pradesh", "Maharashtra", "Manipur", "Meghalaya", "Mizoram", "Nagaland", "Odisha", "Panjab", "Pundicherry", "Rajasthan", "Sikkim", "Tamil Nadu", "Telanga", "Tripura", "Uttar Pradesh", "Uttrakhand", "West Bengal"};
View nn1.py
import numpy
def NN(m1, m2, w1, w2, b):
z = m1 * w1 + m2 * w2 + b
return sigmoid(z)
def sigmoid(x):
return 1/(1 + numpy.exp(-x))
w1 = numpy.random.randn()
w2 = numpy.random.randn()
@Mahmood-Hussain
Mahmood-Hussain / Python Turtle fun
Created Mar 28, 2019
This gist is fun with python module named as turtle
View Python Turtle fun
import turtle
t = turtle.Turtle()
def my_turtle(t, sprint_range, spd):
t.speed(spd)
t.color("red")
for i in range(sprint_range):
t.forward(i)
t.left(i)
View BMI Calculator in Python
def bmi_calculator(name, height_m, weight_kg):
bmi = weight_kg / (height_m ** 2)
print("bmi: ")
print(bmi)
if bmi < 25:
return name + " is not overweight"
else:
return name + " is overweight"
View Miles to Kilometres Converter Python
def convert(miles):
return miles, " miles are equal to ", 1.609 * miles, " Kilometres"
View apple_leaf.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.