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 / 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:

@mbijon
mbijon / gist:2ddf2bfecd58e4921c1350f495261a80
Created Jun 20, 2017
Ruby AES Encryption using OpenSSL
View gist:2ddf2bfecd58e4921c1350f495261a80
#!/usr/bin/env ruby
require "openssl"
require 'digest/sha2'
require 'base64'
# We use the AES 256 bit cipher-block chaining symetric encryption
alg = "AES-256-CBC"
# We want a 256 bit key symetric key based on some passphrase
digest = Digest::SHA256.new
@mbijon
mbijon / gist:5116961cdb728bcaa006a9932d42cb2d
Created Jun 20, 2017
Ruby AES Encryption using OpenSSL
View gist:5116961cdb728bcaa006a9932d42cb2d
#!/usr/bin/env ruby
require "openssl"
require 'digest/sha2'
require 'base64'
# We use the AES 256 bit cipher-block chaining symetric encryption
alg = "AES-256-CBC"
# We want a 256 bit key symetric key based on some passphrase
digest = Digest::SHA256.new
@mbijon
mbijon / xcode8.js
Created Apr 17, 2017 — forked from dpogue/xcode8.js
Hook for Cordova iOS to support "developmentTeam" in buildConfig.json
View xcode8.js
"use strict";
var fs = require('fs');
var path = require('path');
module.exports = function(context) {
var encoding = 'utf-8';
var filepath = 'platforms/ios/cordova/build.xcconfig';
if (context.opts.cordova.platforms.indexOf('ios') === -1) return;
@mbijon
mbijon / xcode8.js
Created Apr 17, 2017 — forked from dpogue/xcode8.js
Hook for Cordova iOS to support "developmentTeam" in buildConfig.json
View xcode8.js
"use strict";
var fs = require('fs');
var path = require('path');
module.exports = function(context) {
var encoding = 'utf-8';
var filepath = 'platforms/ios/cordova/build.xcconfig';
if (context.opts.cordova.platforms.indexOf('ios') === -1) return;
You can’t perform that action at this time.