NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
| ''' | |
| A Reccurent Neural Network (LSTM) implementation example using TensorFlow library. | |
| This example is using the MNIST database of handwritten digits (http://yann.lecun.com/exdb/mnist/) | |
| Long Short Term Memory paper: http://deeplearning.cs.cmu.edu/pdfs/Hochreiter97_lstm.pdf | |
| Author: Aymeric Damien | |
| Project: https://github.com/aymericdamien/TensorFlow-Examples/ | |
| ''' | |
| import cv2 | |
| import tensorflow as tf | |
| import tensorflow.examples.tutorials.mnist.input_data as input_data |
NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
shutil.copy()
shutil.copytree() #copy whole folder
shutil.move() calls says, “Move C:\bacon.txt into the folder C:\eggs.”
Calling os.unlink(path) will delete the file at path.
Calling os.rmdir(path) will delete the folder at path. This folder must be empty of any files or folders.
Calling shutil.rmtree(path) will remove the folder at path, and all files and folders it contains will also be deleted.
| #!/usr/bin/env python | |
| # | |
| # @author : 01110011 01101000 01111001 01100001 01101101 01100001 01101100 | |
| # date : 15/06/2017 | |
| import tensorflow as tf | |
| from tensorflow.examples.tutorials.mnist import input_data | |
| mnist = input_data.read_data_sets('MNIST_data', one_hot=True) |
Numpy library provides you with an array data structure that holds some benefits over Python lists, such as: being more compact, faster access in reading and writing items, being more convenient and more efficient. NumPy is a Python library that is the core library for scientific computing in Python. It contains a collection of tools and techniques that can be used to solve on a computer mathematical models of problems in Science and Engineering. One of these tools is a high-performance multidimensional array object that is a powerful data structure for efficient computation of arrays and matrices.
It's a pretty long guide, but covers almost everything you need to know in the beginning about Numpy. So be patient.
| #!/bin/bash | |
| youtube-dl -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' -o "/media/shyamal/Windows/Users/Shyamal/Videos/%(uploader)s/-%(title)s.%(ext)s" $1 |
| #!/bin/bash | |
| youtube-dl -x --audio-quality 0 --audio-format "mp3" -o "/media/shyamal/Windows/Users/Shyamal/Music/%(uploader)s/%(title)s.%(ext)s" $1 |
| %Initialization : Clearing workspace | |
| clf; clear all; | |
| syms x y % Specifies that x and y are variables and the equations would be in their terms | |
| %Equations defining the curve | |
| eq1 = ((x/7)^2*sqrt(abs(abs(x)-3)/(abs(x)-3))+(y/3)^2*sqrt(abs(y+3/7*sqrt(33))/(y+3/7*sqrt(33)))-1); | |
| eq2 = (abs(x/2)-((3*sqrt(33)-7)/112)*x^2-3+sqrt(1-(abs(abs(x)-2)-1)^2)-y); | |
| eq3 = (9*sqrt(abs((abs(x)-1)*(abs(x)-.75))/((1-abs(x))*(abs(x)-.75)))-8*abs(x)-y); | |
| eq4 = (3*abs(x)+.75*sqrt(abs((abs(x)-.75)*(abs(x)-.5))/((.75-abs(x))*(abs(x)-.5)))-y); |