Skip to content

Instantly share code, notes, and snippets.

Sina Meraji sinameraji

View GitHub Profile
leon-sleepinglion /
Created Mar 16, 2018
Coding for Economist Minds - Week 1
# This is a compound interest calculator, along with some challenge
# Written by Leon Wee, March 2018.
# Anyone may freely copy or modify this program.
# C = P[(1+r)^n - 1]
# Where:
# C = the compound interest
# P = the principal investment amount (the initial deposit or loan amount)
yjzhang /
Last active Jul 6, 2020
basic python implementation of k-means and online k-means clustering
# Online k-means algorithm
# see
import numpy as np
def k_means(data, k, threshhold=2):
Does k-means clustering of the data.
lmcneel /
Last active Jul 11, 2020
How to remove node_modules after they have been added to a repo

How to remove node_modules

  1. Create a .gitignore file in the git repository if it does not contain one

touch .gitignore 2. Open up the .gitignore and add the following line to the file

node_modules 3. Remove the node_modules folder from the git repository

btfak /
Created May 26, 2016
How to use Hexo and deploy to GitHub Pages
View maktabkhooneh.js
.map(x => () => fetch(x.href)
.then(x => x.text())
.then(x => new DOMParser().parseFromString(x, 'text/html').querySelector('meta[property="og:video"]').content)
.then(y => console.log(y, x.children[1].innerText.trim().replace(/\s/g, '_') + '.mp4'))
.reduce((promise, next) => promise.then(next), Promise.resolve())
.then(() => console.log('Finished!'));
PurpleBooth /
Last active Jul 13, 2020
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


aheinze / gist:02db57da725cf7ba4047
Last active Oct 24, 2019
letterAvatar - create Letter avatar based on name initials
View gist:02db57da725cf7ba4047
* LetterAvatar
* Create Letter avatar based on Initials -
* based on
(function(w, d){
function LetterAvatar (name, size) {
spacemonkey / .gitignore
Created Jul 11, 2014
.gitignore for Hexo powered websites
View .gitignore

Install cask that extends the brew command :

brew install phinze/cask/brew-cask

Install calibre using cask :

brew cask install calibre
You can’t perform that action at this time.