Skip to content

Instantly share code, notes, and snippets.

🕶️
busy, busy

Mike Bijon mbijon

🕶️
busy, busy
Block or report user

Report or block mbijon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mbijon
mbijon / doorkeeper_config.md
Created Jun 2, 2020 — forked from jiggneshhgohel/doorkeeper_config.md
Doorkeeper (with JWT token) Server and Client applications configuration, references etc
View doorkeeper_config.md

Provider(aka Server)-side configuration, routes, controllers etc

Rails 5.0.0.1

Doorkeeper 4.2.6

Devise 4.2.0

Gemfile

@mbijon
mbijon / adabound.py
Created May 31, 2020 — forked from skitaoka/adabound.py
AdaBound AMSBound for Keras
View adabound.py
# coding: utf-8
"""
Based on Luo et al. (2019). Adaptive Gradient Methods with Dynamic Bound of Learning Rate. In Proc. of ICLR 2019.
"""
from tensorflow import keras
class AdaBound(keras.optimizers.Optimizer):
def __init__(self, lr=0.001, beta1=0.9, beta2=0.999, final_lr=0.1, gamma=1e-3, epsilon=None, weight_decay=0, amsbound=False, **kwargs):
super(AdaBound, self).__init__(**kwargs)
with keras.backend.name_scope(self.__class__.__name__):
@mbijon
mbijon / min-char-rnn.py
Created May 13, 2020 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
View min-char-rnn.py
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@mbijon
mbijon / rbenv-ubuntu.sh
Created Feb 7, 2020 — forked from rahul286/rbenv-ubuntu.sh
rbenv ubuntu server cheatsheet
View rbenv-ubuntu.sh
## ubuntu server with bash shell
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
## verify
type rbenv
@mbijon
mbijon / encode.py
Created Oct 20, 2019 — forked from duhaime/encode.py
Simple ASCII Encoding
View encode.py
import numpy as np
from scipy.misc import imread
from skimage.transform import resize
import matplotlib.pyplot as plt
import json, glob
#%matplotlib inline
def path_to_string(path):
'''Given a path to an image, return a string of that image as ascii'''
@mbijon
mbijon / measure_img_similarity.py
Created Oct 20, 2019 — forked from duhaime/measure_img_similarity.py
Compare image similarity in Python using Structural Similarity, Pixel Comparisons, Wasserstein Distance (Earth Mover's Distance), and SIFT
View measure_img_similarity.py
import warnings
from skimage.measure import compare_ssim
from skimage.transform import resize
from scipy.stats import wasserstein_distance
from scipy.misc import imsave
from scipy.ndimage import imread
import numpy as np
import cv2
##
@mbijon
mbijon / measure_img_similarity.py
Created Oct 20, 2019 — forked from duhaime/measure_img_similarity.py
Compare image similarity in Python using Structural Similarity, Pixel Comparisons, Wasserstein Distance (Earth Mover's Distance), and SIFT
View measure_img_similarity.py
import warnings
from skimage.measure import compare_ssim
from skimage.transform import resize
from scipy.stats import wasserstein_distance
from scipy.misc import imsave
from scipy.ndimage import imread
import numpy as np
import cv2
##
@mbijon
mbijon / nginx.conf
Last active Oct 19, 2019 — forked from Stanback/nginx.conf
Nginx CORS-support for proxied Grape/Rails/Passenger APIs
View nginx.conf
#
# CORS-header support example while nginx proxies Rails/Grape + Passenger
# ...not a complete config file
#
server {
listen 443 ssl;
root /foo/public;
# Modify for API-specific
try_files $uri/index.html $uri @passenger;
@mbijon
mbijon / umap_sparse.py
Created Aug 22, 2018 — forked from johnhw/umap_sparse.py
1 million prime UMAP layout
View umap_sparse.py
### JHW 2018
import numpy as np
import umap
# This code from the excellent module at:
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
import random
View keybase.md

Keybase proof

I hereby claim:

  • I am mbijon on github.
  • I am mbijon (https://keybase.io/mbijon) on keybase.
  • I have a public key ASDneF_5-coE6CEyRCzP3YMftB04es5vID21FVADl4k39go

To claim this, I am signing this object:

You can’t perform that action at this time.