Skip to content

Instantly share code, notes, and snippets.

💭
writing some code

Jeremy L. Morris MorrisLaw

View GitHub Profile
@MorrisLaw
MorrisLaw / insertion_sort.py
Last active Aug 10, 2017
Insertion sort, ascending order based off of the pseudocode in Introduction to Algorithms by C.L.R.S.
View insertion_sort.py
A = [10,2,5,7,3,22]
for j in xrange(1, len(A)):
key = A[j]
# Insert A[j] into the sorted sequence A[1..j-1].
i = j - 1
while (i > -1 and A[i] > key):
A[i + 1] = A[i]
i = i - 1
A[i + 1] = key
@MorrisLaw
MorrisLaw / JsonBulkInsert.java
Created Jul 19, 2017
Insert json in MySQL using MySQL batch pooling.
View JsonBulkInsert.java
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.util.LinkedHashSet;
import java.io.FileInputStream;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
View keybase.md

Keybase proof

I hereby claim:

  • I am MorrisLaw on github.
  • I am morrislaw (https://keybase.io/morrislaw) on keybase.
  • I have a public key whose fingerprint is 20EB 8493 C6D3 30D0 876C 2DFF 6A12 0D78 BE12 366F

To claim this, I am signing this object:

You can’t perform that action at this time.