Skip to content

Instantly share code, notes, and snippets.

View sharavsambuu's full-sized avatar

sharavsambuu sharavsambuu

View GitHub Profile

Advanced Functional Programming with Scala - Notes

Copyright © 2017 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@sharavsambuu
sharavsambuu / README.md
Created October 31, 2016 16:16 — forked from pablobm/README.md
A clear convention for a CRUD with standard Ember + Ember Data

CRUD with Ember (+ Data)

Compatible with Ember 1.13.0+ Compatible with Ember Data 1.13.0+

Ember's official documentation describes a number of low-level APIs, but doesn't talk much about how to put them together. As a result, a simple task such as creating a simple CRUD application is not obvious to a newcomer.

@sharavsambuu
sharavsambuu / rnn-lstm.py
Last active September 30, 2017 08:24 — forked from monikkinom/rnn-lstm.py
Tensorflow RNN-LSTM implementation to count number of set bits in a binary string
#Source code with the blog post at http://monik.in/a-noobs-guide-to-implementing-rnn-lstm-using-tensorflow/
import numpy as np
import random
from random import shuffle
import tensorflow as tf
import time
start = time.time()
@sharavsambuu
sharavsambuu / CATCH_Keras_RL.md
Created September 20, 2017 22:38 — forked from EderSantana/CATCH_Keras_RL.md
Keras plays catch - a single file Reinforcement Learning example
@sharavsambuu
sharavsambuu / autoencoder.py
Created October 18, 2017 23:14 — forked from gabrieleangeletti/autoencoder.py
Denoising Autoencoder implementation using TensorFlow.
import tensorflow as tf
import numpy as np
import os
import zconfig
import utils
class DenoisingAutoencoder(object):
""" Implementation of Denoising Autoencoders using TensorFlow.
@sharavsambuu
sharavsambuu / spacy_intro.ipynb
Created February 21, 2018 15:38 — forked from aparrish/spacy_intro.ipynb
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sharavsambuu
sharavsambuu / gradient_descent.py
Created March 17, 2018 23:19 — forked from ajmaradiaga/gradient_descent.py
Gradient Descent implemented in Python using numpy
import numpy as np
def gradient_descent_runner(points, starting_m, starting_b, learning_rate, num_iterations):
m = starting_m
b = starting_b
for i in range(num_iterations):
m, b = step_gradient(m, b, np.array(points), learning_rate)
return m, b
5.1,3.5,1.4,0.2,Iris-setosa
4.9,3.0,1.4,0.2,Iris-setosa
4.7,3.2,1.3,0.2,Iris-setosa
4.6,3.1,1.5,0.2,Iris-setosa
5.0,3.6,1.4,0.2,Iris-setosa
5.4,3.9,1.7,0.4,Iris-setosa
4.6,3.4,1.4,0.3,Iris-setosa
5.0,3.4,1.5,0.2,Iris-setosa
4.4,2.9,1.4,0.2,Iris-setosa
4.9,3.1,1.5,0.1,Iris-setosa
@sharavsambuu
sharavsambuu / test.py
Created March 20, 2018 01:08 — forked from totakke/test.py
Python 3 compatible MeCab-python example code
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
import MeCab
import sys
import string
sentence = "太郎はこの本を二郎を見た女性に渡した。"
@sharavsambuu
sharavsambuu / mparser.py
Created March 20, 2018 11:35 — forked from satomacoto/mparser.py
Parser with MeCab
#! /usr/bin/python
# -*- encoding: utf-8 -*-
'''
Parser with MeCab
'''
import MeCab
import glob
import re
import os