Skip to content

Instantly share code, notes, and snippets.

View manashmandal's full-sized avatar
👨‍💻
Probably Coding || ! Probably Coding

Manash Kumar Mandal manashmandal

👨‍💻
Probably Coding || ! Probably Coding
View GitHub Profile
from __future__ import print_function
import numpy as np
import tensorflow as tf
sess = tf.Session()
inp = tf.Variable(np.array([0.0, 0.0, 0.0, 0.0, 1.0]).reshape(1, 1, 5, 1), name="inp")
fil = tf.Variable(np.array([0.0, 0.5, 1.0]).reshape(1, 3, 1, 1), name="fil")
op = tf.nn.conv2d(inp, fil, strides=[1, 1, 1, 1], padding='SAME')
@manashmandal
manashmandal / cylon.js
Last active April 1, 2017 06:47
Arduino Event : Introduction to Arduino & JavaScript
var Cylon = require('cylon');
Cylon.robot({
connections: {
arduino: { adaptor: 'firmata', port: 'COM8' }
},
devices: {
led: { driver: 'led', pin: 13 }
},
@manashmandal
manashmandal / 0-startup-overview.md
Created March 15, 2017 20:41 — forked from dideler/0-startup-overview.md
Startup Engineering notes
from __future__ import print_function
from gensim.models import KeyedVectors
import numpy as np
from sklearn.manifold import TSNE
import matplotlib.pyplot as plt
# Loading the vectors
## [Warning] Takes a lot of time
en_model = KeyedVectors.load_word2vec_format('wiki.en/wiki.en.vec')
from __future__ import print_function
from gensim.models import KeyedVectors
# Creating the model
en_model = KeyedVectors.load_word2vec_format('wiki.en/wiki.en.vec')
# Getting the tokens
words = []
for word in en_model.vocab:
words.append(word)
@manashmandal
manashmandal / app.py
Last active February 26, 2017 08:59
Workshop : Day 4
# Import flask library
from flask import Flask
# Initialize the application
app = Flask(__name__)
# Define a route using Python Decorator
@app.route('/')
def hello_world():
return "<h1>Hello, KUETians!</h1>"
@manashmandal
manashmandal / esp8266_arduino.ino
Created February 20, 2017 17:00
ESP8266 With Arduino
#define baud 115200
#define RX 10
#define TX 11
#include <SoftwareSerial.h>
String inputString = "";
bool stringComplete = false;
SoftwareSerial wifi(RX, TX);
import numpy as np
from scipy import linalg
from __future__ import print_function
K = linalg.toeplitz([-2, 1, 0, 0, 0, 0])
P, L, U = linalg.lu(K)
print (linalg.inv(L))
#include <Servo.h>
Servo servoMain;
SoftwareSerial gsm(2,3);
String outMessage = "Gas Leaking!";
String destinationNumber = "+8801722063216";
void setup() {
Serial.begin(4800);
pinMode(0, INPUT);
@manashmandal
manashmandal / bangla.txt
Created January 6, 2017 12:07
Reading bangla in python 2
পাইথন
বাংলাদেশ