Skip to content

Instantly share code, notes, and snippets.

View Kulbear's full-sized avatar
🏳️
not active

Kulbear

🏳️
not active
View GitHub Profile
@Kulbear
Kulbear / openapi_specification_fka_swagger_specification_tutorial.md
Created December 20, 2016 09:16 — forked from arno-di-loreto/openapi_specification_fka_swagger_specification_tutorial.md
OpenAPI Specification (fka Swagger Specification) tutorial files from [API Handyman blog](http://apihandyman.io)
function goTop (acc, t) {
const acceleration = acc || 0.1
const time = t || 16
const document = window.document
let x1 = 0
let y1 = 0
let x2 = 0
let y2 = 0
@Kulbear
Kulbear / 2048.py
Last active July 28, 2019 21:12
2048
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Authors: Ji Yang <jyang7@ualberta.ca>
# License: MIT
# Version: 1.0.0
# Last Updated: May 14, 2017
import random
import sys
@Kulbear
Kulbear / non-local-mean.m
Created June 17, 2017 05:55
non-local-mean.m
function [output]=simple_nlm(input,t,f,h1,h2,selfsim)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% input : image to be filtered
% t : radius of search window
% f : radius of similarity window
% h1,h2 : w(i,j) = exp(-||GaussFilter(h1) .* (p(i) - p(j))||_2^2/h2^2)
% selfsim : w(i,i) = selfsim, for all i
%
@Kulbear
Kulbear / resume.py
Created July 1, 2017 15:28 — forked from dongweiming/resume.py
Python版本简历
#/usr/bin/env python
# coding=utf-8
import random
import re
def color(messages):
color = '\x1B[%d;%dm' % (1,random.randint(30,37))
return '%s %s\x1B[0m' % (color,messages)
# Uses python3
import sys
from collections import namedtuple
Segment = namedtuple('Segment', 'start end')
def optimal_points(segments):
points = []
segments_by_end = sorted(segments, key=lambda x: x.end)
% Author: Ji Yang
%% Description
% A simple implementation of histogram equalization.
%
%% Note
% Histogram equalization is a technique for adjusting image intensities
% to enhance contrast.
%
@Kulbear
Kulbear / run.py
Last active October 8, 2017 21:42
from tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets
import numpy as np
import timeit
import tensorflow as tf
from pprint import pformat
mnist = read_data_sets("data", one_hot=False)
NUM_CLASS = 10
STEP = 200
@Kulbear
Kulbear / autoencoder.py
Created February 18, 2018 22:57 — 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.
class Node:
def __init__(self, val):
self.val = val
self.next = None
class MyLinkedList:
def __init__(self):
"""
Initialize your data structure here.