Skip to content

Instantly share code, notes, and snippets.

View elchroy's full-sized avatar

Elisha-Wigwe Chijioke O. elchroy

  • Richardson, Texas
View GitHub Profile
@elchroy
elchroy / sorting_algos.js
Created July 3, 2019 12:15
Implementations of common sorting algorithms
/**
* Naive sort - Quadratic time, nested loops
* Divide & Comquer - O(nlogn)
*/
module.exports = {
bubbleSort () {
},
# import packages
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
from os import path, makedirs
import numpy as np
import matplotlib.pyplot as plt
import torch
from torch import nn, optim
import torch.nn.functional as F
@elchroy
elchroy / git-log2json.sh
Created September 13, 2018 18:58 — forked from textarcana/git-log2json.sh
Convert Git logs to JSON. The first script (git-log2json.sh) is all you need, the other two files contain only optional bonus features :) UPDATED 2017: Today I would just use https://github.com/tarmstrong/git2json
#!/usr/bin/env bash
# Use this one-liner to produce a JSON literal from the Git log:
git log \
--pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \
$@ | \
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \
perl -pe 's/},]/}]/'
@elchroy
elchroy / config-editor.md
Created September 13, 2018 17:41 — forked from nnja/config-editor.md
Configure git editor

Set which editor git should use.

This is the program that will open during a commit with no -m flag, a merge, a rebase, etc...

Select from any installed editor. Examples:

  • emacs: emacs
  • vi: vi or vim